diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-11-13 15:25:21 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-11-13 15:25:21 -0800 |
commit | 1fa1ba9a86f1851551dfda177b49f7f52ab31329 (patch) | |
tree | 0c8b806dd28b565df1bf6c7ba0edc072d414e997 | |
parent | 4127726504a7c0b2af47eaffb0f593b0294f7d65 (diff) |
assert our tests do not leave .ll's behind
-rwxr-xr-x | tests/runner.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 0fe740ce..ba01d559 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -94,6 +94,12 @@ class RunnerCore(unittest.TestCase): os.makedirs(dirname) self.working_dir = dirname os.chdir(dirname) + + if not self.save_dir: + self.has_prev_ll = False + for temp_file in os.listdir(TEMP_DIR): + if temp_file.endswith('.ll'): + self.has_prev_ll = True def tearDown(self): if self.save_JS: @@ -107,6 +113,12 @@ class RunnerCore(unittest.TestCase): os.chdir(os.path.join(self.get_dir(), '..')) shutil.rmtree(self.get_dir()) + # Make sure we don't leave stuff around + if not self.has_prev_ll: + for temp_file in os.listdir(TEMP_DIR): + assert not temp_file.endswith('.ll'), temp_file + # TODO assert not temp_file.startswith('emscripten_'), temp_file + def skip(self, why): print >> sys.stderr, '<skipping: %s> ' % why, |