Skip to content

Commit aa0baf6

Browse files
Merge pull request #2 from amartani/main
Set --junitxml when corresponding environment variable is available
2 parents 5c654d0 + a8cf8a1 commit aa0baf6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

python_pytest/pytest_shim.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
if __name__ == "__main__":
1010
pytest_args = ["--ignore=external"]
1111

12+
if os.environ.get("XML_OUTPUT_FILE"):
13+
pytest_args.append("--junitxml={xml_output_file}".format(xml_output_file=os.environ.get("XML_OUTPUT_FILE")))
14+
1215
if os.environ.get("TESTBRIDGE_TEST_ONLY"):
1316
# TestClass.test_fn -> TestClass::test_fn
1417
module_name = os.environ.get("TESTBRIDGE_TEST_ONLY").replace(".", "::")

0 commit comments

Comments
 (0)