diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-09-08 13:08:52 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-09-08 13:08:52 -0700 |
commit | bd5581ffe8937bc863f47850deaf2f68b8944b15 (patch) | |
tree | 0e9753426f8b345678997c60bdacc4d4e093d7bf | |
parent | 77dbc8e0ad2d985f36e7e1d0a67e864ede28c3fb (diff) |
make sure the current working directory is valid in do_emscripten; fixes python failure
-rw-r--r-- | tests/runner.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index d1f56740..6bade05d 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -187,6 +187,10 @@ class RunnerCore(unittest.TestCase): except: pass settings = ['-s %s=%s' % (k, json.dumps(v)) for k, v in exported_settings.items()] + try: + os.getcwd() + except OSError: + os.chdir(self.get_dir()) # ensure the current working directory is valid compiler_output = timeout_run(Popen([EMSCRIPTEN, filename + ('.o.ll' if append_ext else ''), '-o', filename + '.o.js'] + settings + extra_args, stdout=PIPE, stderr=STDOUT), TIMEOUT, 'Compiling') #print compiler_output |