diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-04-23 11:36:44 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-04-23 11:36:44 -0700 |
commit | d0f65558b6f4bc405ad869ab8f77f26ae1fcb6e0 (patch) | |
tree | a1f9f6d43cc197710eee48c9abf1f13ec3d52f24 | |
parent | c130017c4eab6a75ea7bc8d1e9739498f2444521 (diff) |
start of nicer browser test boilerplate
-rwxr-xr-x | tests/runner.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 0f8c1b94..ff4fc1d4 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -7211,6 +7211,14 @@ elif 'browser' in str(sys.argv): Popen(['python', EMCC, program, '-o', 'program.html', '--pre-js', 'reftest.js'] + args).communicate() self.run_browser('program.html', '', '/report_result?0') + def btest(self, filename, expected): # TODO: use in all other tests + open(os.path.join(self.get_dir(), filename), 'w').write(self.with_report_result(open(path_from_root('tests', filename)).read())) + Popen(['python', EMCC, os.path.join(self.get_dir(), filename), '-o', 'something.html']).communicate() + self.run_browser('something.html', '.', '/report_result?' + expected) + + def zzztest_ftransform(self): + self.btest('ftransform.c', '1') + def test_emscripten_api(self): open(os.path.join(self.get_dir(), 'main.cpp'), 'w').write(self.with_report_result(open(path_from_root('tests', 'emscripten_api_browser.cpp')).read())) Popen(['python', EMCC, os.path.join(self.get_dir(), 'main.cpp'), '-o', 'page.html']).communicate() |