|
@@ -53,9 +53,16 @@ def __init__(self):
|
|
|
for test in json.load(sys.stdin):
|
|
|
env = ' '.join(('%s=%s' % (shlex.quote(k), shlex.quote(v))
|
|
|
for k, v in test['env'].items()))
|
|
|
- executable = os.path.relpath(test['cmd'][0])
|
|
|
+ executable = test['cmd'][0]
|
|
|
+ try:
|
|
|
+ executable = os.path.relpath(executable)
|
|
|
+ except:
|
|
|
+ pass
|
|
|
if test['workdir'] is not None:
|
|
|
- test['cmd'][0] = os.path.relpath(test['cmd'][0], test['workdir'])
|
|
|
+ try:
|
|
|
+ test['cmd'][0] = os.path.relpath(executable, test['workdir'])
|
|
|
+ except:
|
|
|
+ test['cmd'][0] = executable
|
|
|
else:
|
|
|
test['cmd'][0] = executable
|
|
|
cmd = '$(.test.env) %s %s' % (env, ' '.join((shlex.quote(x) for x in test['cmd'])))
|