Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: tools/foozzie/v8_foozzie.py

Issue 2622653002: [foozzie] Fix path to metadata (Closed)
Patch Set: presubmit Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/foozzie/testdata/resources-test1.js ('k') | tools/foozzie/v8_foozzie_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/foozzie/v8_foozzie.py
diff --git a/tools/foozzie/v8_foozzie.py b/tools/foozzie/v8_foozzie.py
index 222a3d8cfb2600817275ad9617a56d77dd547a31..df4c0785a791e0085f2218ff23956928141569f7 100755
--- a/tools/foozzie/v8_foozzie.py
+++ b/tools/foozzie/v8_foozzie.py
@@ -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)
« no previous file with comments | « tools/foozzie/testdata/resources-test1.js ('k') | tools/foozzie/v8_foozzie_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698