Page MenuHomePhabricator

Move the JUnit file to the temporary directory
ClosedPublic

Authored by Fabien on Jan 14 2020, 09:08.

Details

Summary

The test_runner.py script generates a JUnit XML ouput file which is
used by the CI to offer comprehensive test report.
The default for it is a constant file name located in the build
directory. The result is that subsequent calls to test_runner.py will
override the previous reports if an explicit file name is not passed.

This diff keeps the file name the same but moves it to the temporary
directory, which is unique to the runner. It avoids collisions, makes it
easier to find the report and makes it more obvious which runner it
relates to.

Test Plan
  1. The test doesn't matter, but feature_help runs fast ./test/functional/test_runner.py feature_help --nocleanup

Ensure the junit_result.xml file is located under the temporary
directory of the runner.

./test/functional/test_runner.py -J junit_report.xml --nocleanup feature_help

Ensure the junit_report.xml file is located under the temporary
directory of the runner.

mkdir -p /tmp/junit
./test/functional/test_runner.py -J /tmp/junit/report.xml --nocleanup feature_help

Ensure the /tmp/junit/report.xml file is created and there is no other
report in the temporary directory.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jasonbcox added a subscriber: jasonbcox.

Macro likestamp:

It's important to note that CI sets tmpdir to be within the build dir, so the CI can find these reports. Otherwise, reviewers may mistakenly believe the junit_reports will end up in /tmp/ on CI.

This revision is now accepted and ready to land.Jan 14 2020, 18:09