aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/runner.py29
1 files changed, 17 insertions, 12 deletions
diff --git a/tests/runner.py b/tests/runner.py
index ed3b8787..f3e705be 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -3708,20 +3708,25 @@ def process(filename):
# print opt, "FAIL"
def test_lua(self):
- if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: make this work')
+ try:
+ os.environ['EMCC_LEAVE_INPUTS_RAW'] = '1'
- # Overflows in luaS_newlstr hash loop
- Settings.SAFE_HEAP = 0 # Has various warnings, with copied HEAP_HISTORY values (fixed if we copy 'null' as the type)
- Settings.CORRECT_OVERFLOWS = 1
- Settings.CHECK_OVERFLOWS = 0
- Settings.CORRECT_SIGNS = 1 # Not sure why, but needed
- Settings.INIT_STACK = 1 # TODO: Investigate why this is necessary
+ if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: make this work')
- self.do_ll_run(path_from_root('tests', 'lua', 'lua.ll'),
- 'hello lua world!\n17\n1\n2\n3\n4\n7',
- args=['-e', '''print("hello lua world!");print(17);for x = 1,4 do print(x) end;print(10-3)'''],
- output_nicerizer=lambda string: string.replace('\n\n', '\n').replace('\n\n', '\n'),
- extra_emscripten_args=['-H', 'libc/fcntl.h,libc/sys/unistd.h,poll.h,libc/math.h,libc/langinfo.h,libc/time.h'])
+ # Overflows in luaS_newlstr hash loop
+ Settings.SAFE_HEAP = 0 # Has various warnings, with copied HEAP_HISTORY values (fixed if we copy 'null' as the type)
+ Settings.CORRECT_OVERFLOWS = 1
+ Settings.CHECK_OVERFLOWS = 0
+ Settings.CORRECT_SIGNS = 1 # Not sure why, but needed
+ Settings.INIT_STACK = 1 # TODO: Investigate why this is necessary
+
+ self.do_ll_run(path_from_root('tests', 'lua', 'lua.ll'),
+ 'hello lua world!\n17\n1\n2\n3\n4\n7',
+ args=['-e', '''print("hello lua world!");print(17);for x = 1,4 do print(x) end;print(10-3)'''],
+ output_nicerizer=lambda string: string.replace('\n\n', '\n').replace('\n\n', '\n'),
+ extra_emscripten_args=['-H', 'libc/fcntl.h,libc/sys/unistd.h,poll.h,libc/math.h,libc/langinfo.h,libc/time.h'])
+ finally:
+ del os.environ['EMCC_LEAVE_INPUTS_RAW']
def get_build_dir(self):
return os.path.join(self.get_dir(), 'building')