diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-12-20 18:49:32 +0200 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-12-20 18:49:32 +0200 |
commit | fb39bb745824774d756dce267c5ea927275b0c7d (patch) | |
tree | 94a8356da18fb7543838351f62fe789a2c9ba382 /tests | |
parent | f4b585968f3a6f3f6f57f9945ab5c369c0bd695b (diff) |
In browser.test_emrun, use --log_stdout and --log_stderr to capture run output instead of python pipe, since on linux, spawning chrome browser would run into a mysterious issue where piping the emrun output would hang the python subprocess spawn.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_browser.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/test_browser.py b/tests/test_browser.py index dbc09b32..b437b5be 100644 --- a/tests/test_browser.py +++ b/tests/test_browser.py @@ -1697,8 +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'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) - (stdout, stderr) = process.communicate() + 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')]) + process.communicate() + stdout = open(os.path.join(outdir, 'stdout.txt'), 'r').read() + stderr = open(os.path.join(outdir, 'stderr.txt'), 'r').read() assert process.returncode == 100 assert 'argc: 4' in stdout assert 'argv[3]: 3' in stdout |