Page MenuHomePhabricator

Move the JUnit file to the temporary directory
ClosedPublic

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

Details

Reviewers
deadalnix
jasonbcox
Group Reviewers
Restricted Project
Commits
rABC41e63750ae78: Move the JUnit file to the temporary directory
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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

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