Running the test suite with -a will now properly show all the executed
commands. The reports also include the environment under which the test
is being executed, which is helpful for reproducing issues.
Details
Diff Detail
- Repository
- rCXX libc++
- Build Status
Buildable 23753 Build 23752: arc lint + arc unit
Event Timeline
Could you elaborate as to why this is needed/beneficial? Most of the information this patch adds to reports is already displayed to the user during the initial configuration.
libcxx/utils/libcxx/test/format.py | ||
---|---|---|
210 | The relevant environment variables should be printed once at the start of the run. IDK why we need to display them again here. I think it only adds noise. The same goes for the compile command. We should dump all the relevant compile flags at the start of the run during initial configuration. | |
214 | How is printing the name of the temporary executable file here helpful? |
This is useful whenever you try to see why a test is passing when you think it should fail. In my case, I was trying to figure out what was different between two lit invocations: a test was failing on a CI but it was passing on my local machine (i.e. I couldn't reproduce the failure). I tried adding -a thinking "this is going to tell me all I need to know", but it didn't. So instead I had to make the test fail artificially, look at what the command-line was (because that is printed when the test fails), and try to reproduce that way. Much better would be to just run the test under -a, which is advertised by lit as dumping everything.
There is some amount of crap in what's printed, e.g. temporary executable files, etc. These can be edited manually when working on a reproduction. Also note that you should not normally use -a when running lit (and I don't think people usually do that). You use -a when you really want to see what's going on, and this patch gives you that information.
LGTM without the environment. If we need more information about the ENV we can print it once, during the initial configuration of the test suite.
The relevant environment variables should be printed once at the start of the run. IDK why we need to display them again here. I think it only adds noise.
The same goes for the compile command. We should dump all the relevant compile flags at the start of the run during initial configuration.