Page MenuHomePhabricator

Move the JUnit file to the temporary directory

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



The 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 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/ feature_help --nocleanup

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

./test/functional/ -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/ -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

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Jan 14 2020, 09:08
Herald added a reviewer: Restricted Project. · View Herald TranscriptJan 14 2020, 09:08
Fabien edited the test plan for this revision. (Show Details)Jan 14 2020, 09:09
jasonbcox accepted this revision.Jan 14 2020, 18:09
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
This revision was automatically updated to reflect the committed changes.