aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
authorAlon Zakai <azakai@mozilla.com>2011-01-17 15:36:26 -0800
committerAlon Zakai <azakai@mozilla.com>2011-01-17 15:36:26 -0800
commit1f3de5c76e4947afccca350da24859e52f6aa83f (patch)
tree1539bbf09d9a3b71e06db5444d4ea5ceb43f8013 /emscripten.py
parent13a520ed493d40e405045df1829863edfdb2308e (diff)
libcxx test; support for linking in test runner; failure in clang_0_1.test_libcxx
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/emscripten.py b/emscripten.py
index 7a92455c..8b4d5e60 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -13,10 +13,14 @@ COMPILER = path_from_root('src', 'compiler.js')
def emscripten(filename, settings):
data = open(filename, 'r').read()
- cwd = os.getcwd()
+ try:
+ cwd = os.getcwd()
+ except:
+ cwd = None
os.chdir(os.path.dirname(COMPILER))
subprocess.Popen(JS_ENGINE + [COMPILER], stdin=subprocess.PIPE).communicate(settings+'\n'+data)[0]
- os.chdir(cwd)
+ if cwd is not None:
+ os.chdir(cwd)
if __name__ == '__main__':
if sys.argv.__len__() not in [2,3,4]: