##// END OF EJS Templates
tests: finally fix up test-fuzz-targets.t...
Augie Fackler -
r44267:19da643d default
parent child Browse files
Show More
@@ -14,7 +14,7 b' PYTHON_CONFIG ?= $$OUT/sanpy/bin/python-'
14 14
15 15 CXXFLAGS += -Wno-deprecated-register
16 16
17 all: bdiff mpatch xdiff
17 all: standalone_fuzz_target_runner.o oss-fuzz
18 18
19 19 standalone_fuzz_target_runner.o: standalone_fuzz_target_runner.cc
20 20
@@ -1,6 +1,7 b''
1 1 #require test-repo
2 2
3 3 $ cd $TESTDIR/../contrib/fuzz
4 $ OUT=$TESTTMP ; export OUT
4 5
5 6 which(1) could exit nonzero, but that's fine because we'll still end
6 7 up without a valid executable, so we don't need to check $? here.
@@ -27,20 +28,37 b' up without a valid executable, so we don'
27 28
28 29 #if clang-libfuzzer
29 30 $ CXX=clang++ havefuzz || exit 80
30 $ $MAKE -s clean all
31 $ $MAKE -s clean all PYTHON_CONFIG=`which python-config`
31 32 #endif
32 33 #if no-clang-libfuzzer clang-6.0
33 34 $ CXX=clang++-6.0 havefuzz || exit 80
34 $ $MAKE -s clean all CC=clang-6.0 CXX=clang++-6.0
35 $ $MAKE -s clean all CC=clang-6.0 CXX=clang++-6.0 PYTHON_CONFIG=`which python-config`
35 36 #endif
36 37 #if no-clang-libfuzzer no-clang-6.0
37 38 $ exit 80
38 39 #endif
39 40
40 Just run the fuzzers for five seconds each to verify it works at all.
41 $ ./bdiff -max_total_time 5
42 $ ./mpatch -max_total_time 5
43 $ ./xdiff -max_total_time 5
41 $ cd $TESTTMP
42
43 Run each fuzzer using dummy.cc as a fake input, to make sure it runs
44 at all. In the future we should instead unpack the corpus for each
45 fuzzer and use that instead.
46
47 $ for fuzzer in `ls *_fuzzer | sort` ; do
48 > echo run $fuzzer...
49 > ./$fuzzer dummy.cc > /dev/null 2>&1
50 > done
51 run bdiff_fuzzer...
52 run dirs_fuzzer...
53 run dirstate_fuzzer...
54 run fm1readmarkers_fuzzer...
55 run fncache_fuzzer...
56 run jsonescapeu8fast_fuzzer...
57 run manifest_fuzzer...
58 run mpatch_fuzzer...
59 run revlog_fuzzer...
60 run xdiff_fuzzer...
44 61
45 62 Clean up.
63 $ cd $TESTDIR/../contrib/fuzz
46 64 $ $MAKE -s clean
General Comments 0
You need to be logged in to leave comments. Login now