diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-10 14:33:35 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-21 10:47:40 -0800 |
commit | e05a784a78acc30c3090a08cb0543a323d3e8248 (patch) | |
tree | aa28c0acdbc25b3d709947e475aa503520277bab /tests | |
parent | ab335b7aa2101494c4d4c91c5c467685c32f745c (diff) |
improve and fix test_relooper
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py index 6966848b..c3ba605f 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -10852,7 +10852,7 @@ fi try_delete(RELOOPER) for i in range(4): - print phase, i + print >> sys.stderr, phase, i opt = min(i, 2) try_delete('a.out.js') output = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world_loop.cpp'), '-O' + str(opt), '--closure', '0'], @@ -10861,7 +10861,10 @@ fi output = '\n'.join(output) assert ('bootstrapping relooper succeeded' in output) == (i == 2), 'only bootstrap on first O2: ' + output assert os.path.exists(RELOOPER) == (i >= 2), 'have relooper on O2: ' + output - assert ('L2 : do {' in open('a.out.js').read()) == (i >= 2), 'reloop code on O2: ' + output + src = open('a.out.js').read() + main = src.split('function _main() {')[1].split('\n}\n')[0] + assert ('while (1) {' in main) == (i >= 2), 'reloop code on O2: ' + src + assert ('switch' not in main) == (i >= 2), 'reloop code on O2: ' + src def test_jcache(self): PRE_LOAD_MSG = 'loading pre from jcache' |