diff --git a/test/common.py b/test/common.py index 76afd9acf98e7..b35c7b44bc1c9 100644 --- a/test/common.py +++ b/test/common.py @@ -650,6 +650,7 @@ def build(self, filename, libraries=None, includes=None, force_c=False, js_outfi compiler.append('-sNO_DEFAULT_TO_CXX') if force_c: + assert shared.suffix(filename) != '.c', 'force_c is not needed for source files ending in .c' compiler.append('-xc') if output_basename: diff --git a/test/sqlite/benchmark.txt b/test/sqlite/benchmark.out similarity index 100% rename from test/sqlite/benchmark.txt rename to test/sqlite/benchmark.out diff --git a/test/test_core.py b/test/test_core.py index b111e767fee0a..877a694e5e42a 100644 --- a/test/test_core.py +++ b/test/test_core.py @@ -3806,7 +3806,7 @@ def test_dlfcn_longjmp(self): pre 8 pre 9 out! -''', force_c=True) +''') # TODO: make this work. need to forward tempRet0 across modules # TODO Enable @with_both_eh_sjlj (the test is not working now) @@ -4025,7 +4025,7 @@ def dylink_test(self, main, side, expected=None, header=None, force_c=False, if header: create_file('header.h', header) - return self.dylink_testf(main, side, expected, force_c, main_module=main_module, **kwargs) + return self.dylink_testf(main, side, expected, main_module=main_module, **kwargs) def dylink_testf(self, main, side=None, expected=None, force_c=False, main_emcc_args=None, main_module=2, @@ -6736,11 +6736,7 @@ def test_sqlite(self, use_pthreads): self.set_setting('USE_PTHREADS') self.setup_node_pthreads() self.emcc_args += ['-sUSE_SQLITE3'] - self.do_run_from_file( - test_file('sqlite/benchmark.c'), - test_file('sqlite/benchmark.txt'), - force_c=True - ) + self.do_run_in_out_file_test(test_file('sqlite/benchmark.c')) @needs_make('mingw32-make') @is_slow_test