diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-10-05 09:55:48 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-10-05 09:55:48 -0700 |
commit | 3b7e9141422c6106b9f406f72bc327228945728d (patch) | |
tree | c4c617fd4cbce98a3a14c2b2dfad987f39366ab4 | |
parent | a9f082c2d60417730d11d2c0dc9da7e6e5ed2e00 (diff) | |
parent | 252869f1624d58c90bcc9748464b3034dbc566da (diff) |
fix merge conflicts
-rw-r--r-- | AUTHORS | 1 | ||||
-rwxr-xr-x | emscripten.py | 10 | ||||
-rw-r--r-- | tests/runner.py | 12 | ||||
-rwxr-xr-x | tools/bindings_generator.py | 4 | ||||
-rwxr-xr-x | tools/dead_function_eliminator.py | 4 | ||||
-rwxr-xr-x | tools/emmaken.py | 4 | ||||
-rwxr-xr-x | tools/emmakenxx.py | 4 | ||||
-rwxr-xr-x | tools/exec_llvm.py | 4 | ||||
-rw-r--r-- | tools/shared.py | 4 |
9 files changed, 25 insertions, 22 deletions
@@ -4,3 +4,4 @@ under the licensing terms detailed in LICENSE. * Alon Zakai <alonzakai@gmail.com> (copyright owned by Mozilla Foundation) * Tim Dawborn <tim.dawborn@gmail.com> * Max Shawabkeh <max99x@gmail.com> +* Sigmund Vik <sigmund_vik@yahoo.com> diff --git a/emscripten.py b/emscripten.py index 32be4450..e7cf1fcc 100755 --- a/emscripten.py +++ b/emscripten.py @@ -14,10 +14,12 @@ from tools import shared TEMP_FILES_TO_CLEAN = [] -def path_from_root(*target): - """Returns the absolute path to the target from the emscripten root.""" - abspath = os.path.abspath(os.path.dirname(__file__)) - return os.path.join(os.path.sep, *(abspath.split(os.sep) + list(target))) +def path_from_root(*pathelems): + """Returns the absolute path for which the given path elements are + relative to the emscripten root. + """ + rootpath = os.path.abspath(os.path.dirname(__file__)) + return os.path.join(rootpath, *pathelems) def get_temp_file(suffix): diff --git a/tests/runner.py b/tests/runner.py index 95538ad3..9f8465a0 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -9,9 +9,9 @@ import os, unittest, tempfile, shutil, time, inspect, sys, math, glob, tempfile, # Setup -abspath = os.path.abspath(os.path.dirname(__file__)) def path_from_root(*pathelems): - return os.path.join(os.path.sep, *(abspath.split(os.sep)[:-1] + list(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()) # Sanity check for config @@ -188,7 +188,7 @@ class RunnerCore(unittest.TestCase): 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') + 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 # Detect compilation crashes and errors @@ -4144,7 +4144,7 @@ class %s(T): def setUp(self): global COMPILER, QUANTUM_SIZE, RELOOP, OPTIMIZE, ASSERTIONS, USE_TYPED_ARRAYS, LLVM_OPTS, SAFE_HEAP, CHECK_OVERFLOWS, CORRECT_OVERFLOWS, CORRECT_OVERFLOWS_LINES, CORRECT_SIGNS, CORRECT_SIGNS_LINES, CHECK_SIGNS, COMPILER_TEST_OPTS, CORRECT_ROUNDINGS, CORRECT_ROUNDINGS_LINES, INVOKE_RUN, SAFE_HEAP_LINES, INIT_STACK, AUTO_OPTIMIZE, RUNTIME_TYPE_INFO, DISABLE_EXCEPTION_CATCHING, PROFILE - COMPILER = '%s' + COMPILER = %r llvm_opts = %d embetter = %d quantum_size = %d @@ -4187,7 +4187,7 @@ TT = %s fullname = '%s_%d_%d%s%s' % ( name, llvm_opts, embetter, '' if quantum == 4 else '_q' + str(quantum), '' if typed_arrays in [0, 1] else '_t' + str(typed_arrays) ) - exec('%s = make_test("%s","%s",%d,%d,%d,%d)' % (fullname, fullname, compiler, llvm_opts, embetter, quantum, typed_arrays)) + exec('%s = make_test(%r,%r,%d,%d,%d,%d)' % (fullname, fullname, compiler, llvm_opts, embetter, quantum, typed_arrays)) del T # T is just a shape for the specific subclasses, we don't test it itself @@ -4403,7 +4403,7 @@ else: if __name__ == '__main__': sys.argv = [sys.argv[0]] + ['-v'] + sys.argv[1:] # Verbose output by default for cmd in [CLANG, LLVM_DIS, SPIDERMONKEY_ENGINE[0], V8_ENGINE[0]]: - if not os.path.exists(cmd): + if not os.path.exists(cmd) and not os.path.exists(cmd + '.exe'): # .exe extension required for Windows print 'WARNING: Cannot find', cmd unittest.main() diff --git a/tools/bindings_generator.py b/tools/bindings_generator.py index 0a1a75cc..4c4bfd3d 100755 --- a/tools/bindings_generator.py +++ b/tools/bindings_generator.py @@ -47,9 +47,9 @@ NOTE: ammo.js is currently the biggest consumer of this code. For some import os, sys, glob, re -abspath = os.path.abspath(os.path.dirname(__file__)) def path_from_root(*pathelems): - return os.path.join(os.path.sep, *(abspath.split(os.sep)[:-1] + list(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()) # Find ply and CppHeaderParser diff --git a/tools/dead_function_eliminator.py b/tools/dead_function_eliminator.py index d6f96536..9106f8b7 100755 --- a/tools/dead_function_eliminator.py +++ b/tools/dead_function_eliminator.py @@ -11,9 +11,9 @@ to remove them before Emscripten runs. import os, sys, re -abspath = os.path.abspath(os.path.dirname(__file__)) def path_from_root(*pathelems): - return os.path.join(os.path.sep, *(abspath.split(os.sep)[:-1] + list(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()) infile = sys.argv[1] diff --git a/tools/emmaken.py b/tools/emmaken.py index f906d958..29268ae2 100755 --- a/tools/emmaken.py +++ b/tools/emmaken.py @@ -59,9 +59,9 @@ import subprocess print >> sys.stderr, 'emmaken.py: ', ' '.join(sys.argv) -abspath = os.path.abspath(os.path.dirname(__file__)) def path_from_root(*pathelems): - return os.path.join(os.path.sep, *(abspath.split(os.sep)[:-1] + list(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()) # If this is a configure-type thing, just do that diff --git a/tools/emmakenxx.py b/tools/emmakenxx.py index 3fd434a4..0fd01d62 100755 --- a/tools/emmakenxx.py +++ b/tools/emmakenxx.py @@ -6,9 +6,9 @@ see emmaken.py import os, sys -abspath = os.path.abspath(os.path.dirname(__file__)) def path_from_root(*pathelems): - return os.path.join(os.path.sep, *(abspath.split(os.sep)[:-1] + list(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()) emmaken = path_from_root('tools', 'emmaken.py') diff --git a/tools/exec_llvm.py b/tools/exec_llvm.py index 3b08111a..04801649 100755 --- a/tools/exec_llvm.py +++ b/tools/exec_llvm.py @@ -36,9 +36,9 @@ the .ll into native code. This can be done as follows: import os, sys from subprocess import Popen, PIPE, STDOUT -abspath = os.path.abspath(os.path.dirname(__file__)) def path_from_root(*pathelems): - return os.path.join(os.path.sep, *(abspath.split(os.sep)[:-1] + list(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()) Popen([LLVM_OPT, sys.argv[1], '-strip-debug', '-o=' + sys.argv[1]+'.clean.bc']).communicate()[0] diff --git a/tools/shared.py b/tools/shared.py index 9eeb1552..86569e73 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -1,9 +1,9 @@ import shutil, time, os from subprocess import Popen, PIPE, STDOUT -abspath = os.path.abspath(os.path.dirname(__file__)) def path_from_root(*pathelems): - return os.path.join(os.path.sep, *(abspath.split(os.sep)[:-1] + list(pathelems))) + rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + return os.path.join(rootpath, *pathelems) CONFIG_FILE = os.path.expanduser('~/.emscripten') if not os.path.exists(CONFIG_FILE): |