diff options
-rwxr-xr-x | emscripten.py | 2 | ||||
-rwxr-xr-x | tests/runner.py | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/emscripten.py b/emscripten.py index 8671afb6..56bc3922 100755 --- a/emscripten.py +++ b/emscripten.py @@ -440,7 +440,7 @@ var asm = (function(global, env, buffer) { value = value|0; tempRet%d = value; } -''' % (i, i) for i in range(10)]) + funcs_js.replace('\n', '\n ') + ''' +''' % (i, i) for i in range(10)]) + funcs_js + ''' %s diff --git a/tests/runner.py b/tests/runner.py index 2fcd4063..fe7b708c 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -9144,9 +9144,12 @@ f.close() if multiprocessing.cpu_count() < 2: return self.skip('need multiple cores') try: os.environ['EMCC_DEBUG'] = '1' - for linkable, chunks, js_chunks in [(0, 3, 2), (1, 7, 4)]: - print linkable, chunks, js_chunks - output, err = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_libcxx.cpp'), '-O1', '-s', 'LINKABLE=%d' % linkable], stdout=PIPE, stderr=PIPE).communicate() + for asm, linkable, chunks, js_chunks in [ + (0, 0, 3, 2), (0, 1, 7, 4), + (1, 0, 3, 2), (1, 1, 7, 5) + ]: + print asm, linkable, chunks, js_chunks + output, err = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_libcxx.cpp'), '-O1', '-s', 'LINKABLE=%d' % linkable, '-s', 'ASM_JS=%d' % asm], stdout=PIPE, stderr=PIPE).communicate() assert 'phase 2 working on %d chunks' %chunks in err, err assert 'splitting up js optimization into %d chunks' % js_chunks in err, err finally: |