Closed swebb2066 closed 4 months ago
The -V flag I find is important, because if a test fails there will generally be some output that is useful.
Doesn't the --output-on-failure do exactly that?
The -V flag I find is important, because if a test fails there will generally be some output that is useful.
Doesn't the --output-on-failure do exactly that?
It's been a while, but I thought it didn't do that at all. There are often multiple sub-tests for each main test, so sometimes it's one of those sub-tests that fails.
it's one of those sub-tests that fails.
I improved that diagnostic somewhat in 7ae2e640f. Would defining LOG4CXX_DEBUG=true in the CI workflows be helpful?
it's one of those sub-tests that fails.
I improved that diagnostic somewhat in 7ae2e64. Would defining LOG4CXX_DEBUG=true in the CI workflows be helpful?
It looks like this will be fine as-is.
Sample output when a test fails:
Test project /home/runner/work/logging-log4cxx/logging-log4cxx/main/build
Start 1: autoconfiguretestcase
1/62 Test #1: autoconfiguretestcase ............... Passed 3.51 sec
Start 2: asyncappendertestcase
2/62 Test #2: asyncappendertestcase ............... Passed 7.80 sec
Start 3: consoleappendertestcase
3/62 Test #3: consoleappendertestcase ............. Passed 0.00 sec
Start 4: decodingtest
4/62 Test #4: decodingtest ........................ Passed 0.00 sec
Start 5: encodingtest
5/62 Test #5: encodingtest ........................ Passed 0.00 sec
Start 6: fileappendertest
6/62 Test #6: fileappendertest .................... Passed 0.00 sec
Start 7: filetestcase
7/62 Test #7: filetestcase ........................ Passed 0.00 sec
Start 8: hexdumptestcase
8/62 Test #8: hexdumptestcase ..................... Passed 0.00 sec
Start 9: hierarchytest
9/62 Test #9: hierarchytest ....................... Passed 0.00 sec
Start 10: hierarchythresholdtestcase
10/62 Test #10: hierarchythresholdtestcase .......... Passed 0.01 sec
Start 11: jsonlayouttest
11/62 Test #11: jsonlayouttest ...................... Passed 0.00 sec
Start 12: l7dtestcase
12/62 Test #12: l7dtestcase ......................... Passed 0.00 sec
Start 13: leveltestcase
13/62 Test #13: leveltestcase ....................... Passed 0.00 sec
Start 14: levelchangetestcase
14/62 Test #14: levelchangetestcase ................. Passed 0.00 sec
Start 15: loggertestcase
15/62 Test #15: loggertestcase ...................... Passed 0.00 sec
Start 16: mdctestcase
16/62 Test #16: mdctestcase ......................... Passed 0.00 sec
Start 17: minimumtestcase
17/62 Test #17: minimumtestcase ..................... Passed 0.00 sec
Start 18: ndctestcase
18/62 Test #18: ndctestcase ......................... Passed 0.00 sec
Start 19: patternlayouttest
19/62 Test #19: patternlayouttest ................... Passed 0.04 sec
Start 20: propertyconfiguratortest
20/62 Test #20: propertyconfiguratortest ............ Passed 0.00 sec
Start 21: rollingfileappendertestcase
21/62 Test #21: rollingfileappendertestcase ......... Passed 0.00 sec
Start 22: streamtestcase
22/62 Test #22: streamtestcase ...................... Passed 0.01 sec
Start 23: locationtest
23/62 Test #23: locationtest ........................ Passed 0.00 sec
Start 24: locationdisabledtest
24/62 Test #24: locationdisabledtest ................ Passed 0.00 sec
Start 25: terminationtestcase
25/62 Test #25: terminationtestcase ................. Passed 0.01 sec
Start 26: absolutetimedateformattestcase
26/62 Test #26: absolutetimedateformattestcase ...... Passed 0.00 sec
Start 27: cacheddateformattestcase
27/62 Test #27: cacheddateformattestcase ............ Passed 0.00 sec
Start 28: casttestcase
28/62 Test #28: casttestcase ........................ Passed 0.00 sec
Start 29: charsetdecodertestcase
29/62 Test #29: charsetdecodertestcase .............. Passed 0.00 sec
Start 30: charsetencodertestcase
30/62 Test #30: charsetencodertestcase .............. Passed 0.17 sec
Start 31: cyclicbuffertestcase
31/62 Test #31: cyclicbuffertestcase ................ Passed 0.03 sec
Start 32: datetimedateformattestcase
32/62 Test #32: datetimedateformattestcase .......... Passed 0.00 sec
Start 33: filewatchdogtest
33/62 Test #33: filewatchdogtest .................... Passed 0.05 sec
Start 34: inetaddresstestcase
34/62 Test #34: inetaddresstestcase ................. Passed 0.01 sec
Start 35: iso8601dateformattestcase
35/62 Test #35: iso8601dateformattestcase ........... Passed 0.00 sec
Start 36: messagebuffertest
36/62 Test #36: messagebuffertest ................... Passed 0.00 sec
Start 37: optionconvertertestcase
37/62 Test #37: optionconvertertestcase ............. Passed 0.00 sec
Start 38: propertiestestcase
38/62 Test #38: propertiestestcase .................. Passed 0.01 sec
Start 39: relativetimedateformattestcase
39/62 Test #39: relativetimedateformattestcase ...... Passed 0.00 sec
Start 40: stringhelpertestcase
40/62 Test #40: stringhelpertestcase ................ Passed 0.00 sec
Start 41: stringtokenizertestcase
41/62 Test #41: stringtokenizertestcase ............. Passed 0.00 sec
Start 42: timezonetestcase
42/62 Test #42: timezonetestcase .................... Passed 0.00 sec
Start 43: transcodertestcase
43/62 Test #43: transcodertestcase .................. Passed 0.00 sec
Start 44: threadutilitytestcase
44/62 Test #44: threadutilitytestcase ............... Passed 0.00 sec
Start 45: syslogwritertest
45/62 Test #45: syslogwritertest .................... Passed 0.01 sec
Start 46: xloggertestcase
46/62 Test #46: xloggertestcase ..................... Passed 0.00 sec
Start 47: xmltests
47/62 Test #47: xmltests ............................***Failed 0.02 sec
LC_CTYPE: C.UTF-8
domtestcase.:
test1
log4cxx: DOMConfigurator configuring file input/xml/DOMTestCase1.xml...
log4cxx: Loading configuration file [input/xml/DOMTestCase1.xml].
log4cxx: debug attribute= "".
log4cxx: Ignoring internalDebug attribute.
log4cxx: Threshold ="".
log4cxx: Retreiving an instance of org.apache.log4j.xml
log4cxx: Setting [org.apache.log4j.xml] additivity to [true].
log4cxx: Level value for org.apache.log4j.xml is [debug].
log4cxx: OptionConverter::toLevel: no class name specified, level=[debug]
log4cxx: org.apache.log4j.xml level set to DEBUG
log4cxx: Class name: [org.apache.log4j.FileAppender]
log4cxx: Setting option name=[File], value=[output/temp.A1]
log4cxx: Setting option name=[Append], value=[false]
log4cxx: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4cxx: Setting option name=[ConversionPattern], value=[%-5p %c{2} - %m%n]
log4cxx: Adding appender named [A1] to logger [org.apache.log4j.xml].
log4cxx: Level value for root is [debug].
log4cxx: OptionConverter::toLevel: no class name specified, level=[debug]
log4cxx: root level set to DEBUG
log4cxx: Adding appender named [A1] to logger [root].
log4cxx: Class name: [org.apache.log4j.FileAppender]
log4cxx: Setting option name=[File], value=[output/temp.A2]
log4cxx: Setting option name=[Append], value=[false]
log4cxx: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4cxx: Setting option name=[ConversionPattern], value=[ [%t] %p %c - %m%n]
log4cxx: Adding appender named [A2] to logger [root].
test3
log4cxx: Checking file log4cxx.xml
log4cxx: Checking file log4cxx.properties
log4cxx: Checking file log4j.xml
log4cxx: Checking file log4j.properties
log4cxx: Could not find default configuration file.
log4cxx: DOMConfigurator configuring file input/xml/DOMTestCase3.xml...
log4cxx: Loading configuration file [input/xml/DOMTestCase3.xml].
log4cxx: debug attribute= "".
log4cxx: Ignoring internalDebug attribute.
log4cxx: Threshold ="".
log4cxx: Level value for root is [debug].
log4cxx: OptionConverter::toLevel: no class name specified, level=[debug]
log4cxx: root level set to DEBUG
log4cxx: Class name: [org.apache.log4j.FileAppender]
log4cxx: Setting option name=[File], value=[output/dom³]
log4cxx: Setting option name=[Append], value=[false]
log4cxx: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4cxx: Setting option name=[ConversionPattern], value=[%-5p %c{2} - %m%n]
log4cxx: Adding appender named [A1] to logger [root].
test4
log4cxx: Checking file log4cxx.xml
log4cxx: Checking file log4cxx.properties
log4cxx: Checking file log4j.xml
log4cxx: Checking file log4j.properties
log4cxx: Could not find default configuration file.
log4cxx: DOMConfigurator configuring file input/xml/DOMTestCase4.xml...
log4cxx: Loading configuration file [input/xml/DOMTestCase4.xml].
log4cxx: debug attribute= "".
log4cxx: Ignoring internalDebug attribute.
log4cxx: Threshold ="".
log4cxx: Level value for root is [debug].
log4cxx: OptionConverter::toLevel: no class name specified, level=[debug]
log4cxx: root level set to DEBUG
log4cxx: Class name: [org.apache.log4j.FileAppender]
log4cxx: Setting option name=[File], value=[output/dom㆕]
log4cxx: Setting option name=[Append], value=[false]
log4cxx: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4cxx: Setting option name=[ConversionPattern], value=[%-5p %c{2} - %m%n]
log4cxx: Adding appender named [A1] to logger [root].
SUCCESS
xmllayouttest.:
testGetContentType
testIgnoresThrowable
testGetHeader
testGetFooter
testFormat
testFormatWithNDC
Line 341: 20 != childElementCount
testGetSetLocationInfo
testActivateOptions
testProblemCharacters
testNDCWithCDATA
FAILED 1 of 10
xmllayouttestcase.:
basic
log4cxx: Checking file log4cxx.xml
log4cxx: Checking file log4cxx.properties
log4cxx: Checking file log4j.xml
log4cxx: Checking file log4j.properties
log4cxx: Could not find default configuration file.
locationInfo
log4cxx: Checking file log4cxx.xml
log4cxx: Checking file log4cxx.properties
log4cxx: Checking file log4j.xml
log4cxx: Checking file log4j.properties
log4cxx: Could not find default configuration file.
testCDATA
log4cxx: Checking file log4cxx.xml
log4cxx: Checking file log4cxx.properties
log4cxx: Checking file log4j.xml
log4cxx: Checking file log4j.properties
log4cxx: Could not find default configuration file.
testNull
log4cxx: Checking file log4cxx.xml
log4cxx: Checking file log4cxx.properties
log4cxx: Checking file log4j.xml
log4cxx: Checking file log4j.properties
log4cxx: Could not find default configuration file.
testMDC
log4cxx: Checking file log4cxx.xml
log4cxx: Checking file log4cxx.properties
log4cxx: Checking file log4j.xml
log4cxx: Checking file log4j.properties
log4cxx: Could not find default configuration file.
testMDCEscaped
log4cxx: Checking file log4cxx.xml
log4cxx: Checking file log4cxx.properties
log4cxx: Checking file log4j.xml
log4cxx: Checking file log4j.properties
log4cxx: Could not find default configuration file.
SUCCESS
Failed Tests Total Fail Failed %
=======================================================================
xmllayouttest. 10 1 10.00%
testFormatWithNDC
Start 48: defaultinittestcase
48/62 Test #48: defaultinittestcase ................. Passed 0.00 sec
Start 49: filtertests
49/62 Test #49: filtertests ......................... Passed 0.00 sec
Start 50: syslogappendertestcase
50/62 Test #50: syslogappendertestcase .............. Passed 0.00 sec
Start 51: telnetappendertestcase
51/62 Test #51: telnetappendertestcase .............. Passed 3.01 sec
Start 52: xmlsocketappendertestcase
52/62 Test #52: xmlsocketappendertestcase ........... Passed 0.00 sec
Start 53: patternparsertestcase
53/62 Test #53: patternparsertestcase ............... Passed 0.00 sec
Start 54: filenamepatterntestcase
54/62 Test #54: filenamepatterntestcase ............. Passed 0.00 sec
Start 55: filterbasedrollingtest
55/62 Test #55: filterbasedrollingtest .............. Passed 0.00 sec
Start 56: manualrollingtest
56/62 Test #56: manualrollingtest ................... Passed 0.01 sec
Start 57: sizebasedrollingtest
57/62 Test #57: sizebasedrollingtest ................ Passed 0.11 sec
Start 58: timebasedrollingtest
58/62 Test #58: timebasedrollingtest ................ Passed 0.02 sec
Start 59: rollingfileappenderpropertiestest
59/62 Test #59: rollingfileappenderpropertiestest ... Passed 10.03 sec
Start 60: errorhandlertestcase
60/62 Test #60: errorhandlertestcase ................ Passed 0.01 sec
Start 61: levelmatchfiltertestcase
61/62 Test #61: levelmatchfiltertestcase ............ Passed 0.00 sec
Start 62: levelrangefiltertestcase
62/62 Test #62: levelrangefiltertestcase ............ Passed 0.00 sec
98% tests passed, 1 tests failed out of 62
Errors while running CTest
Total Test time (real) = 25.04 sec
The following tests FAILED:
47 - xmltests (Failed)
According to this link actions/upload-artifact@v3 is scheduled for deprecation on November 30, 2024.
Also, reduce the volume of unit test output.