aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-19 14:02:53 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-19 14:02:53 -0800
commitfcc5b3413d030391cf04f3e7389c22d9422ce464 (patch)
treee673f9ec019922e7037a431e7733fd1d2d5e52ec
parent875ee5d9dbe4d0b7fd86c9d60a42256a75385817 (diff)
fix test_emcc_caching
-rw-r--r--tests/runner.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 2904d600..b4847a7b 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -6052,12 +6052,15 @@ elif 'sanity' in str(sys.argv):
try_delete('a.out.js')
# Building a file that *does* need dlmalloc *should* trigger cache generation, but only the first time
- for filename, libname, otherlibname in [('hello_malloc.cpp', 'dlmalloc', 'libcxx'), ('hello_libcxx.cpp', 'libcxx', 'dlmalloc')]:
+ for filename, libname in [('hello_malloc.cpp', 'dlmalloc'), ('hello_libcxx.cpp', 'libcxx')]:
for i in range(3):
try_delete(os.path.join(EMSCRIPTEN_TEMP_DIR, 'emcc-0-bc.bc')) # we might need to check this file later
output = self.do([EMCC, path_from_root('tests', filename)])
assert INCLUDING_MESSAGE.replace('X', libname) in output
- assert INCLUDING_MESSAGE.replace('X', otherlibname) not in output
+ if libname == 'dlmalloc':
+ assert INCLUDING_MESSAGE.replace('X', 'libcxx') not in output # we don't need libcxx in this code
+ else:
+ assert INCLUDING_MESSAGE.replace('X', 'dlmalloc') in output # libcxx always forces inclusion of dlmalloc
assert (BUILDING_MESSAGE.replace('X', libname) in output) == (i == 0), 'Must only build the first time'
self.assertContained('hello, world!', run_js('a.out.js'))
assert os.path.exists(EMCC_CACHE)