aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/runner.py10
-rw-r--r--tools/shared.py6
2 files changed, 12 insertions, 4 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 570bfbf2..073075e3 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -72,6 +72,8 @@ except:
# Core test runner class, shared between normal tests and benchmarks
+checked_sanity = False
+
class RunnerCore(unittest.TestCase):
save_dir = os.environ.get('EM_SAVE_DIR')
save_JS = 0
@@ -9267,6 +9269,12 @@ class %s(T):
assert k not in os.environ, k + ' should not be in environment'
os.environ[k] = v
+ global checked_sanity
+ if not checked_sanity:
+ print '(checking sanity from test runner)' # do this after we set env stuff
+ check_sanity(force=True)
+ checked_sanity = True
+
Building.COMPILER_TEST_OPTS = ['-g']
os.chdir(self.get_dir()) # Ensure the directory exists and go there
Building.COMPILER = %r
@@ -13381,8 +13389,6 @@ if __name__ == '__main__':
# Sanity checks
- check_sanity(force=True)
-
total_engines = len(JS_ENGINES)
JS_ENGINES = filter(check_engine, JS_ENGINES)
if len(JS_ENGINES) == 0:
diff --git a/tools/shared.py b/tools/shared.py
index 25c17688..3f695142 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -203,7 +203,7 @@ def check_node_version():
EMSCRIPTEN_VERSION = '1.4.1'
def generate_sanity():
- return EMSCRIPTEN_VERSION + '|' + LLVM_TARGET
+ return EMSCRIPTEN_VERSION + '|' + get_llvm_target()
def check_sanity(force=False):
try:
@@ -400,7 +400,9 @@ except:
# Additional compiler options
# Target choice. Must be synced with src/settings.js (TARGET_*)
-LLVM_TARGET = os.environ.get('EMCC_LLVM_TARGET') or 'i386-pc-linux-gnu' # 'le32-unknown-nacl'
+def get_llvm_target():
+ return os.environ.get('EMCC_LLVM_TARGET') or 'i386-pc-linux-gnu' # 'le32-unknown-nacl'
+LLVM_TARGET = get_llvm_target()
try:
COMPILER_OPTS # Can be set in EM_CONFIG, optionally