This is an archive of the discontinued LLVM Phabricator instance.

[LIT] Change the semantics of the LIT options '-s' and '-v' and modify when information is output.
AbandonedPublic

Authored by EricWF on Mar 19 2015, 1:32 PM.

Details

Summary

Currently I have benchmark tests that I run with LIT that have meaningful output even when the test passes. The aim of this patch is to modify the existing LIT output options in such a way that they can be used to always print the output of a test with minimal changes to how output is currently handled.

The main change in this patch is that -v can be specified multiple times to increase the amount of information that is output. Using lit -vv will cause LIT to report a passing tests output (if any is present).

This patch has a secondary drive-by change that changes when metrics are output. Currently metrics are reported when:

  1. The test failed.
  2. The test passed and neither '-s' nor '-q' are specified.

With this patch metrics are reported ONLY when '-s' is not specified and one of the following is true:

  1. The test failed.
  2. The test passed and neither '-s' nor '-q' are specified and '-vv' is not specified.
  3. The test passed and '-vv' is specified.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 22296.Mar 19 2015, 1:32 PM
EricWF retitled this revision from to [LIT] Change the semantics of the LIT options '-s' and '-v' and modify when information is output..
EricWF updated this object.
EricWF edited the test plan for this revision. (Show Details)
EricWF added reviewers: danalbert, jroelofs, ddunbar.
EricWF added a subscriber: Unknown Object (MLST).
ddunbar edited edge metadata.Apr 5 2015, 10:46 AM

Hi Eric,

I like the feature change, but I find the implementation makes it harder to
see what the conditions are. I would like:

0. Use the label TEST ... OUTPUT when showing the output with no failures.

  1. Keep the metrics output in their own section, and with the current

conditions. We can change that separately if necessary.

This should leave two boolean conditions to check, both of which can be
computed prior to "if shouldShow:..." and then we continue if both are
False.

Also, I would like to see a test that sanity checks for the expected
output, and an update to the docs describing the option.

  • Daniel

Ah, Sorry I never saw your response. I'll make the requested changes soon. Thank!

EricWF updated this revision to Diff 30085.Jul 18 2015, 12:48 PM
EricWF updated this object.
EricWF edited edge metadata.

Address @ddunbar's comments. I'm not quite sure what semantics you want for showing metrics on passing tests. Could you clarify?

  1. Remove *most* changes regarding metrics. Metrics are now shown on passing tests with '-vv' as well.
  2. Add tests for change.
  3. Update doc for --verbose. (Wording suggestions welcome).
EricWF abandoned this revision.Apr 19 2016, 7:29 PM

Abandoning. I no longer need this.

utils/lit/lit/main.py