idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.77k stars 1.05k forks source link

Coloring problem in displaying results of test harness failures that have colored results #7735

Closed permcody closed 7 years ago

permcody commented 8 years ago

Description of the enhancement or error report

OK this coloring stuff is technically part of the TestHarness but it's not really a bug more of an unfinished implementation.

When colored results are displayed inside of the the indented TestHarness output, the coloring can get messed up. This is due to the lack of a "stack-based" color coding system. Consider a failing test that has multiline colored output (typical of an error message or warning). From the MOOSE perspective, the color code is set at the start of a message and should continue for several lines until it is reset to the default. This doesn't work however when the TestHarness has it's own line by line color codes that it sets to show the output from a particular test.

Rationale for the enhancement or information for reproducing the error

Create a test with a multiline failure or warning while triggering verbose output in the TestHarness. This effect can be further exacerbated with multiapp output.

As a starter we just need to save the current color code (don't know how to do that) so that it can be restored if the TestHarness commandeers it for it's own purposes.

Identified impact

(i.e. Internal object changes, limited interface changes, public API change, or a list of specific applications impacted)

No functional changes.

permcody commented 8 years ago

Tag @brianmoose

rwcarlsen commented 7 years ago

I think this was fixed by #8312 - reopen if not.

permcody commented 7 years ago

I'm not so sure. We need to test this and verify. #8312 handles multiple color codes in a single line for MOOSE but the TestHarness adds yet another colored prefix on top of that. I think it should work but I haven't verified it. It would be even better if we created a regex to check for the desired behavior in the TestHarness tester. Reopening until this has been verified.

permcody commented 7 years ago

@milljm and @brianmoose - I still want this coloring ticket closed (not a high priority but just looking for tickets for Jason). MOOSE should theoretically be working correctly with all color codes now, even in the multiapp setting. This is especially true after @rwcarlsen's recent changes to the error reporting macro were checked in. It might be time to look for cases where this breaks down and fix them.

The nastiest case is running a multiapp that prints a warning or failure message from the subapp. If you run the testharness with "-v" that means up to three colors on one line! See if that works, try the multiline case too. If that works but it still doesn't work in CIVET, we'll blame @brianmoose. If I'm not around have @rwcarlsen or @aeslaughter make you a multiapp test that prints a colorful message (I mean literally colorful).

rwcarlsen commented 7 years ago

See my rwcarlsen/moose crazy-color branch for a good multi-level multiapp example that moose+test-harness gets right. Run ./run_tests --re multilevel.dt_from_master.

permcody commented 7 years ago

So it may just be the color CIVET at this point. Good! On Thu, Mar 2, 2017 at 6:05 PM Robert Carlsen notifications@github.com wrote:

See my rwcarlsen/moose crazy-color branch for a good multi-level multiapp example that moose+test-harness gets right.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/idaholab/moose/issues/7735#issuecomment-283811750, or mute the thread https://github.com/notifications/unsubscribe-auth/AC5XILgHtTE-31ISSinZX54Q4mayZgysks5rh0sqgaJpZM4J742i .

brianmoose commented 7 years ago

If anyone sees some bad coloring in CIVET, please let me know.

permcody commented 7 years ago

MOOSE coloring should be working properly, even when displayed through the TestHarness.