aboutsummaryrefslogtreecommitdiff
path: root/tests/test_benchmark.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_benchmark.py')
-rw-r--r--tests/test_benchmark.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_benchmark.py b/tests/test_benchmark.py
index 233ffb48..303141c4 100644
--- a/tests/test_benchmark.py
+++ b/tests/test_benchmark.py
@@ -62,8 +62,9 @@ class ClangBenchmarker(Benchmarker):
return self.parent.run_native(self.filename, args)
class JSBenchmarker(Benchmarker):
- def __init__(self, name, extra_args=[]):
+ def __init__(self, name, engine, extra_args=[]):
self.name = name
+ self.engine = engine
self.extra_args = extra_args
def build(self, parent, filename, args, shared_args, emcc_args, native_args, native_exec):
@@ -91,13 +92,14 @@ process(sys.argv[1])
assert os.path.exists(filename + '.js'), 'Failed to compile file: ' + output[0]
def run(self, args):
- return run_js(self.filename + '.js', engine=JS_ENGINE, args=args, stderr=PIPE, full_output=True)
+ return run_js(self.filename + '.js', engine=self.engine, args=args, stderr=PIPE, full_output=True)
# Benchmarkers
benchmarkers = [
ClangBenchmarker('clang'),
- JSBenchmarker('JS'),
- JSBenchmarker('JS-f32', ['-s', 'PRECISE_F32=2'])
+ JSBenchmarker('JS-f32', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2']),
+ JSBenchmarker('JS', SPIDERMONKEY_ENGINE),
+ JSBenchmarker('v8', V8_ENGINE)
]
class benchmark(RunnerCore):