diff options
-rwxr-xr-x | emscripten.py | 1 | ||||
-rwxr-xr-x | tests/runner.py | 14 |
2 files changed, 14 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py index e7321903..66fbbccf 100755 --- a/emscripten.py +++ b/emscripten.py @@ -51,6 +51,7 @@ def process_funcs(args): funcs_file = temp_files.get('.func_%d.ll' % i).name open(funcs_file, 'w').write(ll) out = shared.run_js(compiler, compiler_engine, [settings_file, funcs_file, 'funcs', forwarded_file] + libraries, stdout=subprocess.PIPE, cwd=path_from_root('src')) + shared.try_delete(funcs_file) return out.split('//FORWARDED_DATA:') def emscript(infile, settings, outfile, libraries=[]): diff --git a/tests/runner.py b/tests/runner.py index 26073cd7..b2249dac 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, @@ -1602,7 +1614,7 @@ c5,de,15,8a #define TEST(func) \ { \ char *word = "WORD"; \ - char *wordEntry = "Â"; \ + char wordEntry[2] = { -61,-126 }; /* "Â"; */ \ int cmp = func(word, wordEntry, 2); \ printf("Compare value " #func " is %d\\n", cmp); \ } |