-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
58 lines (43 loc) · 1.72 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
node_modules:
npm install
.PHONY: init
init: node_modules
npm run init
.PHONY: generate
generate: node_modules
npm run generate
.PHONY: test
test: generate
npm run test
.PHONY: examples
examples: init generate
npm run examples
.PHONY: parse
parse: init generate
npm run parse $(file)
.PHONY: jsfuzz
jsfuzz: fuzz/jsfuzz/node_modules
npm --prefix fuzz/jsfuzz run fuzz
fuzz/jsfuzz/node_modules:
npm --prefix fuzz/jsfuzz install
.PHONY: jsfuzz-crash
jsfuzz-crash:
npm run parse fuzz/jsfuzz/crash.config
.PHONY: aflfuzz
aflfuzz: fuzz/aflplusplus/target/release/tree-sitter-afl-fuzzer
afl-fuzz -i examples/ -o fuzz/aflplusplus/out -n -f fuzz/aflplusplus/out/current.config -- fuzz/aflplusplus/target/release/tree-sitter-afl-fuzzer fuzz/aflplusplus/out/current.config
fuzz/aflplusplus/target/release/tree-sitter-afl-fuzzer:
cargo build --manifest-path fuzz/aflplusplus/Cargo.toml --release
.PHONY: aflrs
aflrs: fuzz/afl.rs/target/debug/tree-sitter-afl-rs
cargo afl fuzz -i examples/ -o fuzz/afl.rs/out fuzz/afl.rs/target/debug/tree-sitter-afl-rs
fuzz/afl.rs/target/debug/tree-sitter-afl-rs:
cargo afl build --manifest-path fuzz/afl.rs/Cargo.toml
test/upstream/options:
mkdir --parents test/upstream
curl --silent https://man.openbsd.org/ssh_config | htmlq --text 'section > dl > dt' | grep --invert-match '%' | grep --invert-match '/' > test/upstream/options
test/upstream/missing: test/upstream/options
cat test/upstream/options | xargs --no-run-if-empty --replace sh -c "grep --no-ignore-case --recursive --quiet --include '*.txt' {} ./test/corpus || echo '{}'" > test/upstream/missing
.PHONY: upstream
upstream: test/upstream/missing
@if test "$$( wc --lines < test/upstream/missing )" -gt 0; then cat test/upstream/missing && exit 1; fi