diff --git a/tests/test_sanity.py b/tests/test_sanity.py index 58a8004f11106..0db37f1d10004 100644 --- a/tests/test_sanity.py +++ b/tests/test_sanity.py @@ -106,6 +106,9 @@ class sanity(RunnerCore): @classmethod def setUpClass(cls): super(sanity, cls).setUpClass() + # Unlike the other test suites we explicitly don't want to be skipping + # the sanity checks here + del os.environ['EMCC_SKIP_SANITY_CHECK'] shutil.copyfile(CONFIG_FILE, CONFIG_FILE + '_backup') print() diff --git a/tools/shared.py b/tools/shared.py index 98c5525564098..17262316068d0 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -543,11 +543,14 @@ def check_sanity(force=False): EM_CONFIG (so, we re-check sanity when the settings are changed). We also re-check sanity and clear the cache when the version changes. """ + if not force and os.environ.get('EMCC_SKIP_SANITY_CHECK') == '1': + return + # We set EMCC_SKIP_SANITY_CHECK so that any subprocesses that we launch will + # not re-run the tests. + os.environ['EMCC_SKIP_SANITY_CHECK'] = '1' with ToolchainProfiler.profile_block('sanity'): check_llvm_version() expected = generate_sanity() - if os.environ.get('EMCC_SKIP_SANITY_CHECK') == '1': - return reason = None if not CONFIG_FILE: return # config stored directly in EM_CONFIG => skip sanity checks