aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-04 20:44:29 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-04 20:44:29 -0800
commit08e7619a88c246baf022a9cfdeafc21db068b9d0 (patch)
tree674bd9c6f3b262d4454b34a16ab7aabf508e648d /tests/runner.py
parent51fbd38572cb1cd01950c038e7d7ab9fed8cac2a (diff)
sanity check for compiler engine in test runner
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py
index f1357012..828e5b8e 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -4990,9 +4990,21 @@ else:
if __name__ == '__main__':
sys.argv = [sys.argv[0]] + ['-v'] + sys.argv[1:] # Verbose output by default
- # TODO: check for js engines ([] or out of [])
+
+ # Sanity checks
+
+ try:
+ check = run_js(COMPILER_ENGINE, path_from_root('tests', 'hello_world.js'))
+ except Exception, e:
+ check = str(e)
+ if check != 'hello, world!\n':
+ print 'WARNING: The JavaScript shell used for compiling (%s) does not seem to work. Check ~/.emscripten. Output:\n---\n\n%s\n\n---\n' % (str(COMPILER_ENGINE), check)
+
for cmd in [CLANG, LLVM_DIS]:
if not os.path.exists(cmd) and not os.path.exists(cmd + '.exe'): # .exe extension required for Windows
print 'WARNING: Cannot find', cmd
+
+ # Go
+
unittest.main()