aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-26 11:20:29 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-26 11:20:29 -0700
commit1c92c15746d6eff0522fdb819a8d4213334f1144 (patch)
treee1ecb16eb0c1c239ac68385684307bad82677fdb
parent70d3a36274858ce8ed071036fb1903e02d606663 (diff)
move test_nostdincxx from other to sanity, because it causes the cache to be cleared, and so cannot be safely run in parallel with other tests
-rw-r--r--tests/test_other.py21
-rw-r--r--tests/test_sanity.py27
2 files changed, 26 insertions, 22 deletions
diff --git a/tests/test_other.py b/tests/test_other.py
index d6e67e59..ce3dee79 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -330,27 +330,6 @@ f.close()
os.chdir(path_from_root('tests')) # Move away from the directory we are about to remove.
shutil.rmtree(tempdirname)
- def test_nostdincxx(self):
- try:
- old = os.environ.get('EMCC_LLVM_TARGET') or ''
- for compiler in [EMCC, EMXX]:
- for target in ['i386-pc-linux-gnu', 'le32-unknown-nacl']:
- print compiler, target
- os.environ['EMCC_LLVM_TARGET'] = target
- out, err = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-v'], stdout=PIPE, stderr=PIPE).communicate()
- out2, err2 = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-v', '-nostdinc++'], stdout=PIPE, stderr=PIPE).communicate()
- assert out == out2
- def focus(e):
- assert 'search starts here:' in e, e
- assert e.count('End of search list.') == 1, e
- return e[e.index('search starts here:'):e.index('End of search list.')+20]
- err = focus(err)
- err2 = focus(err2)
- assert err == err2, err + '\n\n\n\n' + err2
- finally:
- if old:
- os.environ['EMCC_LLVM_TARGET'] = old
-
def test_failure_error_code(self):
for compiler in [EMCC, EMXX]:
# Test that if one file is missing from the build, then emcc shouldn't succeed, and shouldn't try to produce an output file.
diff --git a/tests/test_sanity.py b/tests/test_sanity.py
index 931645e2..4188afff 100644
--- a/tests/test_sanity.py
+++ b/tests/test_sanity.py
@@ -519,4 +519,29 @@ fi
finally:
del os.environ['EMCC_DEBUG']
- del os.environ['EMCC_JSOPT_MIN_CHUNK_SIZE'] \ No newline at end of file
+ del os.environ['EMCC_JSOPT_MIN_CHUNK_SIZE']
+
+ def test_nostdincxx(self):
+ restore()
+ Cache.erase()
+
+ try:
+ old = os.environ.get('EMCC_LLVM_TARGET') or ''
+ for compiler in [EMCC, EMXX]:
+ for target in ['i386-pc-linux-gnu', 'le32-unknown-nacl']:
+ print compiler, target
+ os.environ['EMCC_LLVM_TARGET'] = target
+ out, err = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-v'], stdout=PIPE, stderr=PIPE).communicate()
+ out2, err2 = Popen([PYTHON, EMCC, path_from_root('tests', 'hello_world.cpp'), '-v', '-nostdinc++'], stdout=PIPE, stderr=PIPE).communicate()
+ assert out == out2
+ def focus(e):
+ assert 'search starts here:' in e, e
+ assert e.count('End of search list.') == 1, e
+ return e[e.index('search starts here:'):e.index('End of search list.')+20]
+ err = focus(err)
+ err2 = focus(err2)
+ assert err == err2, err + '\n\n\n\n' + err2
+ finally:
+ if old:
+ os.environ['EMCC_LLVM_TARGET'] = old
+