diff options
-rwxr-xr-x | tests/runner.py | 18 | ||||
-rw-r--r-- | tools/shared.py | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/tests/runner.py b/tests/runner.py index ed4f334c..9f037164 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -14927,12 +14927,30 @@ fi finally: del os.environ['EMCC_DEBUG'] + restore() + + def ensure_cache(): + self.do([EMCC, '-O2', path_from_root('tests', 'hello_world.c')]) + # Manual cache clearing + ensure_cache() assert os.path.exists(EMCC_CACHE) output = self.do([EMCC, '--clear-cache']) assert ERASING_MESSAGE in output assert not os.path.exists(EMCC_CACHE) + # Changing LLVM_ROOT, even without altering .emscripten, clears the cache + ensure_cache() + old = os.environ.get('LLVM') + try: + os.environ['LLVM'] = 'waka' + assert os.path.exists(EMCC_CACHE) + output = self.do([EMCC]) + assert ERASING_MESSAGE in output + assert not os.path.exists(EMCC_CACHE) + finally: + if old: os.environ['LLVM'] = old + try_delete(CANONICAL_TEMP_DIR) def test_relooper(self): diff --git a/tools/shared.py b/tools/shared.py index ba926f72..250c018d 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -286,7 +286,7 @@ def check_node_version(): EMSCRIPTEN_VERSION = '1.5.3' def generate_sanity(): - return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + return EMSCRIPTEN_VERSION + '|' + get_llvm_target() + '|' + LLVM_ROOT def check_sanity(force=False): try: |