Skip to content

Commit

Permalink
Merge pull request aws#93 in VFS/bamboos from feature/VFS-1677-accept…
Browse files Browse the repository at this point in the history
…ance-tests-started-for-many to develop

# By Jakub Kudzia
# Via Jakub Kudzia
* commit '99165fb4da4f7f88dca149aa614ffa2dd4047d3d':
  VFS-1677 - fix-typo
  VFS-1677 - add pytest report path as test_run.py argument
  • Loading branch information
michalrw committed Mar 16, 2016
2 parents 52a07c5 + 99165fb commit 4b60555
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docker/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
help='Test dir to run.',
dest='test_dir')

parser.add_argument(
'--report-path', '-r',
action='store',
default='test-reports/results.xml',
help='Path to JUnit tests report',
dest='report_path')

[args, pass_args] = parser.parse_known_args()

command = '''
Expand All @@ -47,7 +54,7 @@
os.setregid({gid}, {gid})
os.setreuid({uid}, {uid})
command = ['py.test'] + {args} + ['{test_dir}'] + ['--junitxml=test-reports/results.xml']
command = ['py.test'] + {args} + ['{test_dir}'] + ['--junitxml={report_path}']
ret = subprocess.call(command)
sys.exit(ret)
'''
Expand All @@ -56,7 +63,8 @@
uid=os.geteuid(),
gid=os.getegid(),
test_dir=args.test_dir,
shed_privileges=(platform.system() == 'Linux'))
shed_privileges=(platform.system() == 'Linux'),
report_path=args.report_path)

ret = docker.run(tty=True,
rm=True,
Expand Down

0 comments on commit 4b60555

Please sign in to comment.