diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-24 19:59:16 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-08-24 19:59:16 -0700 |
commit | e3a06c12b14de8c182c8de09343409568f749ff9 (patch) | |
tree | 63a16befbeae99ac6a5492a02c866a669a4cc525 /tests | |
parent | fcf52d655c45eb9ad31763bb8af00402308e7759 (diff) |
emit memory init files when closure is run, fixes #1547
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 4 | ||||
-rw-r--r-- | tests/test_core.py | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index bbbc23e5..827d65a9 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -156,7 +156,11 @@ process(sys.argv[1]) ''') transform.close() transform_args = ['--js-transform', "%s %s" % (PYTHON, transform_filename)] + if '--memory-init-file' in self.emcc_args: + try_delete(filename + '.o.js.mem') Building.emcc(filename + '.o.ll', Settings.serialize() + self.emcc_args + transform_args + Building.COMPILER_TEST_OPTS, filename + '.o.js') + if '--memory-init-file' in self.emcc_args: + assert os.path.exists(filename + '.o.js.mem') if post2: post2(filename + '.o.js') # Build JavaScript code from source code diff --git a/tests/test_core.py b/tests/test_core.py index 142d6df4..54509f2c 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -6762,6 +6762,7 @@ date: 18.07.2013w; day 18, month 7, year 2013, extra: 201, 3 def test_files(self): if self.emcc_args is not None and '-O2' in self.emcc_args: self.emcc_args += ['--closure', '1'] # Use closure here, to test we don't break FS stuff + self.emcc_args = filter(lambda x: x != '-g', self.emcc_args) # ensure we test --closure 1 --memory-init-file 1 (-g would disable closure) Settings.CORRECT_SIGNS = 1 # Just so our output is what we expect. Can flip them both. post = ''' |