Skip to content

Commit

Permalink
Merge pull request emscripten-core#4782 from juj/fix_windows_benchmar…
Browse files Browse the repository at this point in the history
…k_run

fix_windows_benchmark_run
  • Loading branch information
juj authored Dec 8, 2016
2 parents f7a02e5 + 8adff06 commit 2ea9c2a
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions tests/test_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def build(self, parent, filename, args, shared_args, emcc_args, native_args, nat
if lib_builder: native_args = native_args + lib_builder(self.name, native=True, env_init={ 'CC': self.cc, 'CXX': self.cxx })
if not native_exec:
compiler = self.cxx if filename.endswith('cpp') else self.cc
cmd = [compiler, '-fno-math-errno', filename, '-o', filename+'.native'] + self.args + shared_args + native_args
process = Popen(cmd, stdout=PIPE, stderr=parent.stderr_redirect)
cmd = [compiler, '-fno-math-errno', filename, '-o', filename+'.native'] + self.args + shared_args + native_args + get_clang_native_args()
process = Popen(cmd, stdout=PIPE, stderr=parent.stderr_redirect, env=get_clang_native_env())
output = process.communicate()
if process.returncode is not 0:
print >> sys.stderr, "Building native executable with command failed", ' '.join(cmd)
Expand Down Expand Up @@ -132,12 +132,16 @@ def run(self, args):
# Benchmarkers
try:
benchmarkers_error = ''
benchmarkers = [
NativeBenchmarker('clang', CLANG_CC, CLANG),
JSBenchmarker('sm-asmjs', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2']),
JSBenchmarker('sm-wasm', SPIDERMONKEY_ENGINE, ['-s', 'BINARYEN=1', '-s', 'BINARYEN_METHOD="native-wasm"', '-s', 'BINARYEN_IMPRECISE=1']),
JSBenchmarker('v8-wasm', V8_ENGINE, ['-s', 'BINARYEN=1', '-s', 'BINARYEN_METHOD="native-wasm"', '-s', 'BINARYEN_IMPRECISE=1']),
]
benchmarkers = [NativeBenchmarker('clang', CLANG_CC, CLANG)]
if SPIDERMONKEY_ENGINE and SPIDERMONKEY_ENGINE[0]:
benchmarkers += [
JSBenchmarker('sm-asmjs', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2']),
JSBenchmarker('sm-wasm', SPIDERMONKEY_ENGINE, ['-s', 'BINARYEN=1', '-s', 'BINARYEN_METHOD="native-wasm"', '-s', 'BINARYEN_IMPRECISE=1'])
]
if V8_ENGINE and V8_ENGINE[0]:
benchmarkers += [
JSBenchmarker('v8-wasm', V8_ENGINE, ['-s', 'BINARYEN=1', '-s', 'BINARYEN_METHOD="native-wasm"', '-s', 'BINARYEN_IMPRECISE=1'])
]
except Exception, e:
benchmarkers_error = str(e)
benchmarkers = []
Expand Down

0 comments on commit 2ea9c2a

Please sign in to comment.