aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-12-21 16:56:03 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-12-21 16:56:03 -0800
commitd71d791c840ce0c4e1f5f4645464ba577db3f776 (patch)
tree21663384d875d4958834f2f7c097f03a78cbb3c8 /tests/runner.py
parent29afa96aafdbca47994422949cc4403ef6dd4b8f (diff)
fix test_lua
Diffstat (limited to 'tests/runner.py')
-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')