From 6c3427930919ce646a61f413f92a635dd2b32c42 Mon Sep 17 00:00:00 2001 From: Jakub Kudzia Date: Thu, 3 Mar 2016 14:26:14 +0100 Subject: [PATCH 1/2] VFS-1677 - add pytest report path as test_run.py argument --- docker/test_run.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docker/test_run.py b/docker/test_run.py index 6d25f5ec8c8..6acae153c42 100755 --- a/docker/test_run.py +++ b/docker/test_run.py @@ -34,6 +34,13 @@ help='Test dir to run.', dest='test_dir') +parser.add_argument( + '--report-path', '-r', + action='store', + default='tests-reports/results.xml', + help='Path to JUnit tests report', + dest='report_path') + [args, pass_args] = parser.parse_known_args() command = ''' @@ -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) ''' @@ -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, From d7fb220eca4cd96528e7900de6febcfeeaa9aa74 Mon Sep 17 00:00:00 2001 From: Jakub Kudzia Date: Thu, 3 Mar 2016 15:35:58 +0100 Subject: [PATCH 2/2] VFS-1677 - fix-typo --- docker/test_run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/test_run.py b/docker/test_run.py index 6acae153c42..b8b9d7fad9d 100755 --- a/docker/test_run.py +++ b/docker/test_run.py @@ -37,7 +37,7 @@ parser.add_argument( '--report-path', '-r', action='store', - default='tests-reports/results.xml', + default='test-reports/results.xml', help='Path to JUnit tests report', dest='report_path')