kframework/k — pull request #965 by osa1 (2014-09-18 21:48:42+00:00)
Title: KTest propagate debug flag to processes

Do not merge yet. There's a missing feature(I did not update --dry yet).

Some notes:

- Programs are only run twice when --debug is enabled and program is expected to produce error output. (so that we can use --debug output in verbose output and non--debug output to compare program error output with expected error output)
- If --debug is enabled, it's always passed to programs. No matter what the verbosity setting is. (except in second run of programs with expected output)
- If stack trace is printed, it's only used in verbose output and not in generated JUnit reports.
- KTest only cares about error outputs when programs terminate with non-zero exit code. So if a program exists with zero but still prints a stack trace to _stderr_ because of --debug, the test still passes.
- If program prints something different to _stdout_ due to --debug use and exit with non-zero, then the test fails.