diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-02-25 20:23:56 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-02-25 20:23:56 -0800 |
commit | 3e489d4ba4aa70907f0cffb54864814fb873208e (patch) | |
tree | c47083726a244c162d5ace74d912597bc6afd11f | |
parent | da9f5bf26ad3476cebde550f5b1c2c5dca40ac58 (diff) |
run a sanity check after clearing the cache
-rwxr-xr-x | emcc | 1 | ||||
-rw-r--r-- | tests/test_sanity.py | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -940,6 +940,7 @@ try: newargs[i] = '' logging.warning('clearing cache') shared.Cache.erase() + shared.check_sanity(force=True) # this is a good time for a sanity check sys.exit(0) elif newargs[i] == '--save-bc': check_bad_eq(newargs[i]) diff --git a/tests/test_sanity.py b/tests/test_sanity.py index 07582d28..25858a8b 100644 --- a/tests/test_sanity.py +++ b/tests/test_sanity.py @@ -15,6 +15,8 @@ def wipe(): def mtime(filename): return os.stat(filename).st_mtime +SANITY_MESSAGE = 'Emscripten: Running sanity checks' + class sanity(RunnerCore): @classmethod def setUpClass(self): @@ -279,7 +281,6 @@ fi del os.environ['EM_IGNORE_SANITY'] def test_emcc(self): - SANITY_MESSAGE = 'Emscripten: Running sanity checks' SANITY_FAIL_MESSAGE = 'sanity check failed to run' # emcc should check sanity if no ${EM_CONFIG}_sanity @@ -436,6 +437,7 @@ fi output = self.do([PYTHON, EMCC, '--clear-cache']) assert ERASING_MESSAGE in output assert not os.path.exists(EMCC_CACHE) + assert SANITY_MESSAGE in output # Changing LLVM_ROOT, even without altering .emscripten, clears the cache ensure_cache() |