Skip to content

Commit b0e6608

Browse files
authored
Merge pull request #20 from aaltat/xunit
Create xunit report
2 parents 550c361 + ca9613b commit b0e6608

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

utest/run.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
#!/usr/bin/env python
2-
2+
import platform
33
from os.path import abspath, dirname, join
44
import sys
55

66
import pytest
77

88

99
curdir = dirname(abspath(__file__))
10+
atest_dir = join(curdir, '..', 'atest')
11+
python_version = platform.python_version()
12+
xunit_report = join(atest_dir, 'results', 'xunit-%s.xml' % python_version)
1013
sys.path.insert(0, join(curdir, '..', 'src'))
11-
sys.path.insert(0, join(curdir, '..', 'atest'))
12-
rc = pytest.main(sys.argv[1:] + ['-p', 'no:cacheprovider', curdir])
14+
sys.path.insert(0, atest_dir)
15+
pytest_args = sys.argv[1:] + [
16+
'-p', 'no:cacheprovider',
17+
'--junitxml=%s' % xunit_report,
18+
'-o', 'junit_family=xunit2',
19+
curdir
20+
]
21+
rc = pytest.main(pytest_args)
1322
sys.exit(rc)

0 commit comments

Comments
 (0)