Skip to content

Commit

Permalink
Merge pull request #2 from amartani/main
Browse files Browse the repository at this point in the history
Set --junitxml when corresponding environment variable is available
  • Loading branch information
caseyduquettesc authored Jan 10, 2023
2 parents 5c654d0 + a8cf8a1 commit aa0baf6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python_pytest/pytest_shim.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
if __name__ == "__main__":
pytest_args = ["--ignore=external"]

if os.environ.get("XML_OUTPUT_FILE"):
pytest_args.append("--junitxml={xml_output_file}".format(xml_output_file=os.environ.get("XML_OUTPUT_FILE")))

if os.environ.get("TESTBRIDGE_TEST_ONLY"):
# TestClass.test_fn -> TestClass::test_fn
module_name = os.environ.get("TESTBRIDGE_TEST_ONLY").replace(".", "::")
Expand Down

0 comments on commit aa0baf6

Please sign in to comment.