Skip to content

Commit 8b45f3c

Browse files
committed
Fixed running utests with atests like "py -3"
1 parent 085b8a0 commit 8b45f3c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/run.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525

2626
from __future__ import print_function
2727

28-
import sys
29-
import subprocess
3028
from os.path import abspath, dirname, exists, join
3129
from os import mkdir
3230
from shutil import rmtree
31+
import shlex
32+
import sys
33+
import subprocess
3334

3435
import robot
3536
import robotstatuschecker
@@ -49,8 +50,9 @@
4950
mkdir(results)
5051

5152
if not arguments:
52-
print('Running unit tests with %s.' % interpreter)
53-
rc = subprocess.call([interpreter, join(curdir, 'utest', 'run.py')])
53+
print('Running unit tests with "%s".' % interpreter)
54+
command = shlex.split(interpreter) + [join(curdir, 'utest', 'run.py')]
55+
rc = subprocess.call(command)
5456
print()
5557
if rc != 0:
5658
print('%d unit test%s failed.' % (rc, 's' if rc != 1 else ''))

0 commit comments

Comments
 (0)