diff options
Diffstat (limited to 'scripts/fuzz_opt.py')
-rw-r--r-- | scripts/fuzz_opt.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index 3087705ab..9cf3ff44d 100644 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -22,7 +22,7 @@ import shutil import sys import time -from test.shared import options, NODEJS, V8_OPTS, V8 +from test import shared # parameters @@ -47,11 +47,11 @@ LOG_LIMIT = 125 def in_binaryen(*args): - return os.path.join(options.binaryen_root, *args) + return os.path.join(shared.options.binaryen_root, *args) def in_bin(tool): - return os.path.join(options.binaryen_root, 'bin', tool) + return os.path.join(shared.options.binaryen_root, 'bin', tool) def random_size(): @@ -166,7 +166,7 @@ def run_bynterp(wasm, args): def run_d8(wasm): - return run_vm([V8] + V8_OPTS + [in_binaryen('scripts', 'fuzz_shell.js'), '--', wasm]) + return run_vm([shared.V8] + shared.V8_OPTS + [in_binaryen('scripts', 'fuzz_shell.js'), '--', wasm]) # There are two types of test case handlers: @@ -200,10 +200,10 @@ class CompareVMs(TestCaseHandler): def run_vms(self, js, wasm): results = [] results.append(fix_output(run_bynterp(wasm, ['--fuzz-exec-before']))) - results.append(fix_output(run_vm([V8, js] + V8_OPTS + ['--', wasm]))) + results.append(fix_output(run_vm([shared.V8, js] + shared.V8_OPTS + ['--', wasm]))) # append to add results from VMs - # results += [fix_output(run_vm([V8, js] + V8_OPTS + ['--', wasm]))] + # results += [fix_output(run_vm([shared.V8, js] + shared.V8_OPTS + ['--', wasm]))] # results += [fix_output(run_vm([os.path.expanduser('~/.jsvu/jsc'), js, '--', wasm]))] # spec has no mechanism to not halt on a trap. so we just check until the first trap, basically # run(['../spec/interpreter/wasm', wasm]) @@ -281,13 +281,13 @@ class Wasm2JS(TestCaseHandler): if random.random() < 0.5: cmd += ['-O'] main = run(cmd + FEATURE_OPTS) - with open(os.path.join(options.binaryen_root, 'scripts', 'wasm2js.js')) as f: + with open(os.path.join(shared.options.binaryen_root, 'scripts', 'wasm2js.js')) as f: glue = f.read() with open('js.js', 'w') as f: f.write(glue) f.write(main) f.write(wrapper) - out = fix_output(run_vm([NODEJS, 'js.js', 'a.wasm'])) + out = fix_output(run_vm([shared.NODEJS, 'js.js', 'a.wasm'])) if 'exception' in out: # exception, so ignoring - wasm2js does not have normal wasm trapping, so opts can eliminate a trap out = IGNORE |