alexanderrevello commented on a change in pull request #759:
URL: https://github.com/apache/daffodil/pull/759#discussion_r812047567
##########
File path:
daffodil-cli/src/it/scala/org/apache/daffodil/parsing/TestCLIParsing.scala
##########
@@ -1319,4 +1319,34 @@ class TestCLIparsing {
}
+ @Test def test_2575_DFDLX_Trace_output(): Unit = {
+
+ val schemaFile =
Util.daffodilPath("daffodil-cli/src/it/resources/org/apache/daffodil/CLI/trace_input.dfdl.xsd")
+ val inputFile =
Util.daffodilPath("daffodil-cli/src/it/resources/org/apache/daffodil/CLI/input/trace_input.txt")
+ val log4jConfig =
Util.daffodilPath("daffodil-cli/src/it/resources/org/apache/daffodil/CLI/conf/log4j2_traceOutput.xml")
+ val (testSchemaFile, testInputFile, testLog4jConfig) = if (Util.isWindows)
(Util.cmdConvert(schemaFile), Util.cmdConvert(inputFile),
Util.cmdConvert(log4jConfig)) else (schemaFile, inputFile, log4jConfig)
+
+ val DAFFODIL_JAVA_OPTS = Map("DAFFODIL_JAVA_OPTS" ->
("-Dlog4j.configurationFile=" + testLog4jConfig + " -Xms256m -Xmx2048m
-Dfile.encoding=UTF-8"))
+
+ val shell = Util.start("", envp = DAFFODIL_JAVA_OPTS)
+
+ try{
+
+ val cmd = String.format("%s -vvvv parse -r output -s %s %s",
Util.binPath, testSchemaFile, testInputFile)
+
+ shell.sendLine(cmd)
+
+ //show stderr has no output
+ shell.expectIn(1,contains(""))
Review comment:
This was only for this particular test it can be changed in whatever
configuration is defined by the user. The log4j configuration file was changed
to output to stdout instead of stderr because the PTR was to not put directly
into stderr, but if using the log4j interface it would not be directly in stderr
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]