aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-24 23:11:48 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-24 23:11:48 -0700
commit8f4fa60b38fe344c178aef97f04b966bb87fcdfb (patch)
treee4b135195b4c6d0e3ee80306b813c743687caa31
parente3a06c12b14de8c182c8de09343409568f749ff9 (diff)
test for closure+mem init file in a more focused manner
-rwxr-xr-xtests/runner.py4
-rw-r--r--tests/test_core.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 827d65a9..bbbc23e5 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -156,11 +156,7 @@ 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 54509f2c..7facf395 100644
--- a/tests/test_core.py
+++ b/tests/test_core.py
@@ -6789,8 +6789,13 @@ def process(filename):
other.close()
src = open(path_from_root('tests', 'files.cpp'), 'r').read()
+
+ mem_file = 'src.cpp.o.js.mem'
+ try_delete(mem_file)
self.do_run(src, ('size: 7\ndata: 100,-56,50,25,10,77,123\nloop: 100 -56 50 25 10 77 123 \ninput:hi there!\ntexto\n$\n5 : 10,30,20,11,88\nother=some data.\nseeked=me da.\nseeked=ata.\nseeked=ta.\nfscanfed: 10 - hello\nok.\ntexte\n', 'size: 7\ndata: 100,-56,50,25,10,77,123\nloop: 100 -56 50 25 10 77 123 \ninput:hi there!\ntexto\ntexte\n$\n5 : 10,30,20,11,88\nother=some data.\nseeked=me da.\nseeked=ata.\nseeked=ta.\nfscanfed: 10 - hello\nok.\n'),
post_build=post, extra_emscripten_args=['-H', 'libc/fcntl.h'])
+ if self.emcc_args and '--memory-init-file' in self.emcc_args:
+ assert os.path.exists(mem_file)
def test_files_m(self):
# Test for Module.stdin etc.