-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Trace functionality for CLI TDML test #1047
Conversation
e741032
to
8d10275
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Assert.usage(dp ne null) | ||
val d = dp.asInstanceOf[Debugger] | ||
Assert.usage(db ne null) | ||
val d = db.asInstanceOf[Debugger] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow. What a bug.
We should disallow use of tiny value names like dp and db and spell things out a little more I think.
db here is a parameter name. That one should definitely be spelled out as 'debugger'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that code cov says this wasn't a bug, because it's not called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I noticed the bug while working on getting the -d functionality to work with "test", it gets called then. This changeset doesn't have that functionality work, but it felt wrong to leave the bug
daffodil-cli/src/test/scala/org/apache/daffodil/cli/cliTest/TestCLItdml.scala
Show resolved
Hide resolved
I was able to fix the debug functionality and added a cli test to confirm it is working |
a8e89c0
to
15c46c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
- fix bug with debugger where we were casting the data processor as an instance of the Debugger instead of the passed in debugger - fix DAFFODIL-2833 by using TraceDebuggerRunner instead of TDMLRunner.trace - set areDebuggingFlag when a debugger is set with withDebugger - add debug.txt to rat excludes DAFFODIL-2694 DAFFODIL-2833
15c46c6
to
aa0995d
Compare
Note, we were unable to test the trace output using CLI tests as the trace output wasn't able to be found using CLI.expect. My guess is it has something to do with output being sent to a PipedOutputStream, which may be different from System.out of the other output.
DAFFODIL-2694