Commit 3d6169c6 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[js-fuzzer] Slightly improve error messages

It took me a while to figure out how to set up everything to run the
fuzzer locally. These improved error messages would have helped to find
errors earlier.

R=machenbach@chromium.org

Bug: chromium:1142437
Change-Id: I414de0a8448cd81fdbf999cc7c3c8cf9394354f6
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2543397
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71239}
parent 0c706497
......@@ -22,6 +22,8 @@ BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
FOOZZIE = os.path.join(BASE_PATH, 'workdir', 'app_dir', 'v8_foozzie.py')
TEST_CASES = os.path.join(BASE_PATH, 'workdir', 'output')
assert os.path.exists(FOOZZIE)
# Output pattern from foozzie.py when it finds a failure.
FAILURE_RE = re.compile(
r'# V8 correctness failure.'
......
......@@ -37,8 +37,11 @@ RUN_ONE = os.path.join(BASE_PATH, 'tools', 'run_one.py')
os.chdir(BASE_PATH)
assert not os.path.exists(TEST_CASES)
os.makedirs(TEST_CASES)
if os.path.exists(TEST_CASES):
if not os.path.isdir(TEST_CASES) or os.listdir(TEST_CASES):
sys.exit("'output' must be an empty directory")
else:
os.mkdir(TEST_CASES)
# Use ~40000 for 24 hours of fuzzing on a modern work station.
RUNS = 8
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment