aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-10-08 17:39:14 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-10-08 17:39:14 -0700
commit0177244ae791541e65c4ccfe201df21a7b748fc8 (patch)
tree1afb741caab2e72d827db1bbee17cf6143b27538
parent252869f1624d58c90bcc9748464b3034dbc566da (diff)
root path fixes
-rw-r--r--tests/runner.py4
-rw-r--r--tools/shared.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 5d227c7b..7e5b0446 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -9,8 +9,8 @@ import os, unittest, tempfile, shutil, time, inspect, sys, math, glob, tempfile,
# Setup
+rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
def path_from_root(*pathelems):
- rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
return os.path.join(rootpath, *pathelems)
exec(open(path_from_root('tools', 'shared.py'), 'r').read())
@@ -4009,7 +4009,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()) # make sure it exists
TT = %s
''' % (fullname, compiler, llvm_opts, embetter, quantum_size, typed_arrays, fullname))
return TT
diff --git a/tools/shared.py b/tools/shared.py
index 4b68555a..a9d7a05a 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -1,8 +1,8 @@
import shutil, time, os
from subprocess import Popen, PIPE, STDOUT
+rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
def path_from_root(*pathelems):
- rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
return os.path.join(rootpath, *pathelems)
CONFIG_FILE = os.path.expanduser('~/.emscripten')