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

Side by Side Diff: testing/libfuzzer/gen_fuzzer_runner.py

Issue 1703523002: [libfuzzer] support of custom libfuzzer options via .options file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nits in check_fuzzer_config.py script and fuzzer_launcher_test.cc Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « testing/libfuzzer/gen_fuzzer_config.py ('k') | testing/libfuzzer/tests/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/python
2 #
3 # Copyright (c) 2015 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 """Generate .sh runner for libfuzzer test.
8
9 Invoked by GN from fuzzer_test.gni.
10 """
11
12 import argparse
13 import os
14 import sys
15
16
17 parser = argparse.ArgumentParser(description="Generate fuzzer launcher.")
18 parser.add_argument('--fuzzer', required=True)
19 parser.add_argument('--launcher', required=True)
20 parser.add_argument('--dict', required=True)
21 args = parser.parse_args()
22
23 out = open(args.launcher, 'w')
24 out.write("""#!/bin/bash
25 set -ue
26 DIR=$(dirname $0)
27 $DIR/%(fuzzer)s -dict=$DIR/%(dict)s $*
28 """ % { "fuzzer": args.fuzzer, "dict": args.dict })
29 out.close()
30
31 os.chmod(args.launcher, os.stat(args.launcher).st_mode | 0o111) # chmod a+x
OLDNEW
« no previous file with comments | « testing/libfuzzer/gen_fuzzer_config.py ('k') | testing/libfuzzer/tests/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698