aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-02-25 20:23:56 -0800
committerAlon Zakai <alonzakai@gmail.com>2014-02-25 20:23:56 -0800
commit3e489d4ba4aa70907f0cffb54864814fb873208e (patch)
treec47083726a244c162d5ace74d912597bc6afd11f
parentda9f5bf26ad3476cebde550f5b1c2c5dca40ac58 (diff)
run a sanity check after clearing the cache
-rwxr-xr-xemcc1
-rw-r--r--tests/test_sanity.py4
2 files changed, 4 insertions, 1 deletions
diff --git a/emcc b/emcc
index b8ccbdcf..1125a639 100755
--- a/emcc
+++ b/emcc
@@ -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()