aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJukka Jylänki <jujjyl@gmail.com>2013-12-20 18:52:53 +0200
committerJukka Jylänki <jujjyl@gmail.com>2013-12-20 18:52:53 +0200
commit5f707bda116a92aadff1f14299c969203f6fdfaf (patch)
treea0593e5d9317787f14d2a888b1f15af6d3aba179 /tests
parentfb39bb745824774d756dce267c5ea927275b0c7d (diff)
Fix browser.test_emrun to utilize the EMSCRIPTEN_BROWSER env. variable like the rest of the browser suite does, instead of always testing user default browser.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_browser.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_browser.py b/tests/test_browser.py
index b437b5be..bdb48d97 100644
--- a/tests/test_browser.py
+++ b/tests/test_browser.py
@@ -1697,7 +1697,10 @@ keydown(100);keyup(100); // trigger the end
# and the browser will not close as part of the test, pinning down the cwd on Windows and it wouldn't be possible to delete it. Therefore switch away from that directory
# before launching.
os.chdir(path_from_root())
- process = subprocess.Popen([PYTHON, path_from_root('emrun'), '--timeout', '30', '--verbose', os.path.join(outdir, 'hello_world.html'), '1', '2', '3', '--log_stdout', os.path.join(outdir, 'stdout.txt'), '--log_stderr', os.path.join(outdir, 'stderr.txt')])
+ args = [PYTHON, path_from_root('emrun'), '--timeout', '30', '--verbose', os.path.join(outdir, 'hello_world.html'), '1', '2', '3', '--log_stdout', os.path.join(outdir, 'stdout.txt'), '--log_stderr', os.path.join(outdir, 'stderr.txt')]
+ if emscripten_browser is not None:
+ args += ['--browser', emscripten_browser]
+ process = subprocess.Popen(args)
process.communicate()
stdout = open(os.path.join(outdir, 'stdout.txt'), 'r').read()
stderr = open(os.path.join(outdir, 'stderr.txt'), 'r').read()