aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiggyBar <sigmund_vik@yahoo.com>2011-09-23 13:45:33 +0300
committerSiggyBar <sigmund_vik@yahoo.com>2011-09-23 13:45:33 +0300
commitf46b1d25bedac2ecde99ec8841dce4e8196442b4 (patch)
treea8037e05938bf8bb6223fbecfad95882b336c187
parent436f1100fc819f394f2d9dfe3117024fb1df597d (diff)
Edited tests/runner.py via GitHub
-rw-r--r--tests/runner.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/runner.py b/tests/runner.py
index ee51238f..5d227c7b 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -9,9 +9,9 @@ import os, unittest, tempfile, shutil, time, inspect, sys, math, glob, tempfile,
# Setup
-abspath = os.path.abspath(os.path.dirname(__file__))
def path_from_root(*pathelems):
- return os.path.join(os.path.sep, *(abspath.split(os.sep)[:-1] + list(pathelems)))
+ rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
+ return os.path.join(rootpath, *pathelems)
exec(open(path_from_root('tools', 'shared.py'), 'r').read())
# Sanity check for config
@@ -185,7 +185,7 @@ class RunnerCore(unittest.TestCase):
except:
pass
settings = ['-s %s=%s' % (k, json.dumps(v)) for k, v in exported_settings.items()]
- compiler_output = timeout_run(Popen([EMSCRIPTEN, filename + ('.o.ll' if append_ext else ''), '-o', filename + '.o.js'] + settings + extra_args, stdout=PIPE, stderr=STDOUT), TIMEOUT, 'Compiling')
+ compiler_output = timeout_run(Popen(['python', EMSCRIPTEN, filename + ('.o.ll' if append_ext else ''), '-o', filename + '.o.js'] + settings + extra_args, stdout=PIPE, stderr=STDOUT), TIMEOUT, 'Compiling')
#print compiler_output
# Detect compilation crashes and errors
@@ -3983,7 +3983,7 @@ class %s(T):
def setUp(self):
global COMPILER, QUANTUM_SIZE, RELOOP, OPTIMIZE, ASSERTIONS, USE_TYPED_ARRAYS, LLVM_OPTS, SAFE_HEAP, CHECK_OVERFLOWS, CORRECT_OVERFLOWS, CORRECT_OVERFLOWS_LINES, CORRECT_SIGNS, CORRECT_SIGNS_LINES, CHECK_SIGNS, COMPILER_TEST_OPTS, CORRECT_ROUNDINGS, CORRECT_ROUNDINGS_LINES, INVOKE_RUN, SAFE_HEAP_LINES, INIT_STACK, AUTO_OPTIMIZE, RUNTIME_TYPE_INFO, DISABLE_EXCEPTIONS
- COMPILER = '%s'
+ COMPILER = %r
llvm_opts = %d
embetter = %d
quantum_size = %d
@@ -4028,7 +4028,7 @@ TT = %s
fullname = '%s_%d_%d%s%s' % (
name, llvm_opts, embetter, '' if quantum == 4 else '_q' + str(quantum), '' if typed_arrays in [0, 1] else '_t' + str(typed_arrays)
)
- exec('%s = make_test("%s","%s",%d,%d,%d,%d)' % (fullname, fullname, compiler, llvm_opts, embetter, quantum, typed_arrays))
+ exec('%s = make_test(%r,%r,%d,%d,%d,%d)' % (fullname, fullname, compiler, llvm_opts, embetter, quantum, typed_arrays))
del T # T is just a shape for the specific subclasses, we don't test it itself
@@ -4244,7 +4244,8 @@ else:
if __name__ == '__main__':
sys.argv = [sys.argv[0]] + ['-v'] + sys.argv[1:] # Verbose output by default
for cmd in [CLANG, LLVM_GCC, LLVM_DIS, SPIDERMONKEY_ENGINE[0], V8_ENGINE[0]]:
- if not os.path.exists(cmd):
+ if not os.path.exists(cmd) and \
+ not os.path.exists(cmd + '.exe'): # .exe extension required for Windows
print 'WARNING: Cannot find', cmd
unittest.main()