##// END OF EJS Templates
fuzz: add a seed corpus for the dirs fuzzer...
Augie Fackler -
r44296:b7af8a02 default
parent child Browse files
Show More
@@ -0,0 +1,29 b''
1 from __future__ import absolute_import, print_function
2
3 import argparse
4 import zipfile
5
6 ap = argparse.ArgumentParser()
7 ap.add_argument("out", metavar="some.zip", type=str, nargs=1)
8 args = ap.parse_args()
9
10 with zipfile.ZipFile(args.out[0], "w", zipfile.ZIP_STORED) as zf:
11 zf.writestr(
12 "greek-tree",
13 "\n".join(
14 [
15 "iota",
16 "A/mu",
17 "A/B/lambda",
18 "A/B/E/alpha",
19 "A/B/E/beta",
20 "A/D/gamma",
21 "A/D/G/pi",
22 "A/D/G/rho",
23 "A/D/G/tau",
24 "A/D/H/chi",
25 "A/D/H/omega",
26 "A/D/H/psi",
27 ]
28 ),
29 )
@@ -62,7 +62,7 b' parsers-%.o: ../../mercurial/cext/%.c'
62
62
63 PARSERS_OBJS=parsers-manifest.o parsers-charencode.o parsers-parsers.o parsers-dirs.o parsers-pathencode.o parsers-revlog.o
63 PARSERS_OBJS=parsers-manifest.o parsers-charencode.o parsers-parsers.o parsers-dirs.o parsers-pathencode.o parsers-revlog.o
64
64
65 dirs_fuzzer: dirs.cc pyutil.o $(PARSERS_OBJS)
65 dirs_fuzzer: dirs.cc pyutil.o $(PARSERS_OBJS) $$OUT/dirs_fuzzer_seed_corpus.zip
66 $(CXX) $(CXXFLAGS) `$(PYTHON_CONFIG) --cflags` \
66 $(CXX) $(CXXFLAGS) `$(PYTHON_CONFIG) --cflags` \
67 -Wno-register -Wno-macro-redefined \
67 -Wno-register -Wno-macro-redefined \
68 -I../../mercurial dirs.cc \
68 -I../../mercurial dirs.cc \
General Comments 0
You need to be logged in to leave comments. Login now