aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-xtests/runner.py12
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,