Commit 6d82e618 authored by machenbach's avatar machenbach Committed by Commit bot

[foozzie] Fix path to metadata

This makes sure the metadata is found during minimization. Also renames
the test files to fit the naming pattern.

BUG=chromium:673246
NOTRY=true
TBR=tandrii@chromium.org,mbarbella@chromium.org

Review-Url: https://codereview.chromium.org/2622653002
Cr-Commit-Position: refs/heads/master@{#42150}
parent 2b961cec
......@@ -79,6 +79,7 @@ FAILURE_TEMPLATE = FAILURE_HEADER_TEMPLATE + """#
### End of configuration %(second_config_label)s
"""
FUZZ_TEST_RE = re.compile(r'.*fuzz(-\d+\.js)')
def parse_args():
parser = argparse.ArgumentParser()
......@@ -117,9 +118,11 @@ def parse_args():
os.path.isfile(options.testcase)), (
'Test case %s doesn\'t exist' % options.testcase)
# Deduce metadata file name from test case. This also removes
# the prefix the test case might get during minimization.
suffix = FUZZ_TEST_RE.match(os.path.basename(options.testcase)).group(1)
options.meta_data_path = os.path.join(
os.path.dirname(options.testcase),
'meta' + os.path.basename(options.testcase)[len('fuzz'):])
os.path.dirname(options.testcase), 'meta' + suffix)
assert os.path.exists(options.meta_data_path), (
'Metadata %s doesn\'t exist' % options.meta_data_path)
......
......@@ -92,7 +92,7 @@ def run_foozzie(first_d8, second_d8):
'--first-d8', os.path.join(TEST_DATA, first_d8),
'--second-d8', os.path.join(TEST_DATA, second_d8),
'--second-config', 'ignition_staging',
os.path.join(TEST_DATA, 'fuzz-test1.js'),
os.path.join(TEST_DATA, 'fuzz-123.js'),
])
......
......@@ -336,12 +336,13 @@ class SourceProcessor(SourceFileProcessor):
'libraries.cc',
'libraries-empty.cc',
'lua_binarytrees.js',
'meta-123.js',
'memops.js',
'poppler.js',
'primes.js',
'raytrace.js',
'regexp-pcre.js',
'resources-test1.js',
'resources-123.js',
'rjsmin.py',
'script-breakpoint.h',
'sqlite.js',
......
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