diff options
-rwxr-xr-x | emcc | 2 | ||||
-rwxr-xr-x | tests/runner.py | 11 | ||||
-rw-r--r-- | tools/shared.py | 2 |
3 files changed, 12 insertions, 3 deletions
@@ -110,7 +110,7 @@ if DEBUG and LEAVE_INPUTS_RAW: print >> sys.stderr, 'emcc: leaving inputs raw' stdout = PIPE if not DEBUG else None # suppress output of child processes stderr = PIPE if not DEBUG else None # unless we are in DEBUG mode -shared.check_sanity() +shared.check_sanity(force=DEBUG) # Handle some global flags diff --git a/tests/runner.py b/tests/runner.py index e4aba0c9..6cd3a215 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -8805,7 +8805,7 @@ elif 'sanity' in str(sys.argv): assert (open(CONFIG_FILE).read() == open(path_from_root('settings.py')).read()), 'Settings should be copied from settings.py' # Second run, with bad EM_CONFIG - for settings in ['blah', 'LLVM_ROOT="blah"; JS_ENGINES=[]; COMPILER_ENGINE=NODE_JS=SPIDERMONKEY_ENGINE=[]']: + for settings in ['blah', 'LLVM_ROOT="blarg"; JS_ENGINES=[]; COMPILER_ENGINE=NODE_JS=SPIDERMONKEY_ENGINE=[]']: f = open(CONFIG_FILE, 'w') f.write(settings) f.close() @@ -8901,6 +8901,15 @@ elif 'sanity' in str(sys.argv): self.assertNotContained(SANITY_MESSAGE, output) self.assertNotContained(SANITY_FAIL_MESSAGE, output) + # but with EMCC_DEBUG=1 we should check + assert not os.environ.get('EMCC_DEBUG'), 'do not run sanity checks in debug mode!' + os.environ['EMCC_DEBUG'] = '1' + output = self.check_working(EMCC) + self.assertContained(SANITY_MESSAGE, output) + del os.environ['EMCC_DEBUG'] + output = self.check_working(EMCC) + self.assertNotContained(SANITY_MESSAGE, output) + # But the test runner should output = self.check_working(commands[1]) self.assertContained(SANITY_MESSAGE, output) diff --git a/tools/shared.py b/tools/shared.py index f6943c92..3f613524 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -95,7 +95,7 @@ def check_sanity(force=False): print >> sys.stderr, 'FATAL: Node.js (%s) does not seem to work, check the paths in %s' % (NODE_JS, EM_CONFIG) sys.exit(0) - for cmd in [CLANG, LLVM_DIS]: + for cmd in [CLANG, LLVM_LINK, LLVM_AR, LLVM_OPT, LLVM_AS, LLVM_DIS, LLVM_NM]: if not os.path.exists(cmd) and not os.path.exists(cmd + '.exe'): # .exe extension required for Windows print >> sys.stderr, 'FATAL: Cannot find %s, check the paths in %s' % (cmd, EM_CONFIG) sys.exit(0) |