Skip to content

Commit

Permalink
Set --junitxml when corresponding environment variable is available
Browse files Browse the repository at this point in the history
  • Loading branch information
amartani committed Jan 10, 2023
1 parent 5c654d0 commit a8cf8a1
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 a8cf8a1

Please sign in to comment.