aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-10-05 10:32:48 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-10-05 10:32:48 -0700
commit526f43d34325b01845bb98d379ff02b46b942e35 (patch)
treeddc6e882fb777b19d415421746fa55c780f2dd66
parent3b7e9141422c6106b9f406f72bc327228945728d (diff)
fix bug with no current working dir
-rw-r--r--tests/runner.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 9f8465a0..91f40c56 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -184,10 +184,6 @@ 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(['python', EMSCRIPTEN, filename + ('.o.ll' if append_ext else ''), '-o', filename + '.o.js'] + settings + extra_args, stdout=PIPE, stderr=STDOUT), TIMEOUT, 'Compiling')
#print compiler_output
@@ -4171,7 +4167,7 @@ class %s(T):
self.pick_llvm_opts(3, True)
COMPILER_TEST_OPTS = ['-g']
shutil.rmtree(self.get_dir()) # Useful in debugging sometimes to comment this out
- self.get_dir() # make sure it exists
+ os.chdir(self.get_dir()) # Ensure the directory exists and go there
TT = %s
''' % (fullname, compiler, llvm_opts, embetter, quantum_size, typed_arrays, fullname))
return TT