Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
libyaplog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
libraries
libyaplog
Commits
f17259c2
Commit
f17259c2
authored
Jul 12, 2018
by
Adrien Oliva
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2-improve-test' into 'master'
Resolve "Improve test" Closes
#2
See merge request
!2
parents
0072e05d
d958f19e
Pipeline
#216
passed with stages
in 1 minute and 14 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
4 deletions
+59
-4
Makefile.am
Makefile.am
+4
-4
utests/ut_libyaplog.h
utests/ut_libyaplog.h
+55
-0
No files found.
Makefile.am
View file @
f17259c2
...
...
@@ -23,13 +23,13 @@ lcov-coverage-clean:
lcov
--compat-libtool
--directory
"
$(top_srcdir)
/src"
--zerocounters
--output-file
"coverage-report.info"
lcov-coverage-filter
:
lcov
--rc
lcov_branch_coverage
=
1
--compat-libtool
--directory
"
$$
(readlink -f "
$(top_builddir)
/
")"
--capture
--output-file
"coverage-report.info"
lcov
--rc
lcov_branch_coverage
=
1
--extract
"coverage-report.info"
"
$$
(readlink -f "
$(top_srcdir)
")/*"
--output-file
"coverage-report2.info"
lcov
--rc
lcov_branch_coverage
=
1
--remove
"coverage-report2.info"
"*utests*"
"*demo*"
--output-file
"coverage-report.info"
lcov
--rc
lcov_branch_coverage
=
0
--compat-libtool
--directory
"
$$
(readlink -f "
$(top_builddir)
/
")"
--capture
--output-file
"coverage-report.info"
lcov
--rc
lcov_branch_coverage
=
0
--extract
"coverage-report.info"
"
$$
(readlink -f "
$(top_srcdir)
")/*"
--output-file
"coverage-report2.info"
lcov
--rc
lcov_branch_coverage
=
0
--remove
"coverage-report2.info"
"*utests*"
"*demo*"
--output-file
"coverage-report.info"
if
GENHTML
GENHTML_EXTRA
=
--rc
lcov_branch_coverage
=
1
--highlight
--legend
--demangle-cpp
GENHTML_EXTRA
=
--rc
lcov_branch_coverage
=
0
--highlight
--legend
--demangle-cpp
if
PERLGD
GENHTML_EXTRA
+=
--frames
endif
# PERLGD
...
...
utests/ut_libyaplog.h
View file @
f17259c2
...
...
@@ -429,4 +429,59 @@ TEST(customout, file_levelgreater)
);
};
TEST_GROUP
(
stdoutlog
)
{
void
setup
()
{
setenv
(
"CSER_LOGDESTINATION"
,
"stdout"
,
1
);
setenv
(
"CSER_LOGLEVEL"
,
"9"
,
1
);
}
void
teardown
()
{
unsetenv
(
"CSER_LOGDESTINATION"
);
unsetenv
(
"CSER_LOGLEVEL"
);
}
};
TEST
(
stdoutlog
,
alllogs
)
{
FLOG
()
<<
"Fatal"
;
ALOG
()
<<
"Alert"
;
CLOG
()
<<
"Crit"
;
ELOG
()
<<
"Error"
;
WLOG
()
<<
"Warning"
;
NLOG
()
<<
"Notice"
;
ILOG
()
<<
"Info"
;
DLOG
()
<<
"Debug"
;
TLOG
()
<<
"Trace"
;
};
TEST_GROUP
(
stderrlog
)
{
void
setup
()
{
setenv
(
"CSER_LOGDESTINATION"
,
"stderr"
,
1
);
setenv
(
"CSER_LOGLEVEL"
,
"9"
,
1
);
}
void
teardown
()
{
unsetenv
(
"CSER_LOGDESTINATION"
);
unsetenv
(
"CSER_LOGLEVEL"
);
}
};
TEST
(
stderrlog
,
alllogs
)
{
FLOG
()
<<
"Fatal"
;
ALOG
()
<<
"Alert"
;
CLOG
()
<<
"Crit"
;
ELOG
()
<<
"Error"
;
WLOG
()
<<
"Warning"
;
NLOG
()
<<
"Notice"
;
ILOG
()
<<
"Info"
;
DLOG
()
<<
"Debug"
;
TLOG
()
<<
"Trace"
;
};
#endif
/* end of include guard: UT_LIBYAPLOG_H_SHF9IC0C */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment