diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-01 14:34:43 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-08-01 14:34:43 -0700 |
commit | 19d109d8eff8fe5a153d5b8536f3cbee7ac10557 (patch) | |
tree | ea196dd02452bc1a9047c1e89edd58674e85d72e /tests/runner.py | |
parent | ae08d741658d4c94e7e8bb4f8bfd429fe88784a2 (diff) |
do not use -nostdinc++ with le32 target at all, it does not need it, and add testing for no system c++ headers showing up in our path
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 55d666e9..ed4f334c 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -10733,6 +10733,27 @@ 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. |