diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-10-12 15:40:12 -0500 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-10-12 15:40:12 -0500 |
commit | 217dbc2b3f0f5eb483790ca6836fa58a09936030 (patch) | |
tree | a11dfe0419231d97dccffa799e0908da57e26a58 /tests | |
parent | 706cca7ca24a7578e24f890e7071bbec5726ec2d (diff) |
embind integration in emcc and work towards a test
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/runner.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 7188fd13..869aeb68 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -7695,6 +7695,20 @@ f.close() output = run_js('scons_integration.js') assert 'If you see this - the world is all right!' in output + def zzztest_embind(self): + # TODO: test -O1 and -O2 + for args, fail in [ + ([], True), # without --bind, we fail + (['--bind'], False) + ]: + print args, fail + try_delete(self.in_dir('a.out.js')) + Popen(['python', EMCC, path_from_root('tests', 'embind', 'embind_test.cpp'), '--post-js', path_from_root('tests', 'embind', 'embind_test.js')] + args, stderr=PIPE if fail else None).communicate() + assert os.path.exists(self.in_dir('a.out.js')) == (not fail) + if not fail: + output = run_js(self.in_dir('a.out.js')) + assert 'If you see this - the world is all right!' in output + def test_llvm_nativizer(self): # avoid impure_ptr problems etc. shutil.copyfile(path_from_root('tests', 'files.cpp'), os.path.join(self.get_dir(), 'files.cpp')) |