-
Notifications
You must be signed in to change notification settings - Fork 14
/
entrypoint.sh
131 lines (96 loc) · 3.46 KB
/
entrypoint.sh
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#!/bin/bash -x
OUTPUT_DIR=/builder
# build native part
echo "Building etcd"
cd /repos/etcd
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/native
cd /repos/etcd/api
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/native
cd /repos/etcd/client/v2
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/native
cd /repos/etcd/client/v3
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/native
cd /repos/etcd/etcdctl
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/native
cd /repos/etcd/pkg
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/native
cd /repos/etcd/server
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/native
cd /repos/etcd/tests
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/native
echo "Building go-ethereum"
cd /repos/go-ethereum
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/go-ethereum/native
echo "Building grpc-go"
cd /repos/grpc-go
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/grpc-go/native
echo "Building kubernetes"
cd /repos/kubernetes
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/kubernetes/native
echo "Building prometheus"
cd /repos/prometheus
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/prometheus/native
echo "Building tidb"
cd /repos/tidb
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/tidb/native
echo "Building moby"
export GO111MODULE=off
pkg_list=$(go list github.com/docker/docker/... | grep -vE "(integration)")
for pkg in $pkg_list
do
echo "generating test bin for $pkg"
name=$(echo "$pkg" | sed "s/\//-/g")
go test -c -o $OUTPUT_DIR/moby/native/$name.test $pkg
done
export GO111MODULE=on
# instrument runtime, code and do instrumentation part
/gfuzz/scripts/patch.sh
# echo "Building etcd"
cd /repos/etcd
/gfuzz/bin/inst --dir . --check-syntax-err --recover-syntax-err
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/inst
cd /repos/etcd/api
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/inst
cd /repos/etcd/client/v2
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/inst
cd /repos/etcd/client/v3
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/inst
cd /repos/etcd/etcdctl
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/inst
cd /repos/etcd/pkg
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/inst
cd /repos/etcd/server
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/inst
cd /repos/etcd/tests
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/etcd/inst
echo "Building go-ethereum"
cd /repos/go-ethereum
/gfuzz/bin/inst --dir . --check-syntax-err --recover-syntax-err
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/go-ethereum/inst
echo "Building grpc-go"
cd /repos/grpc-go
/gfuzz/bin/inst --dir . --check-syntax-err --recover-syntax-err
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/grpc-go/inst
echo "Building kubernetes"
cd /repos/kubernetes
/gfuzz/bin/inst --dir . --check-syntax-err --recover-syntax-err
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/kubernetes/inst
echo "Building prometheus"
cd /repos/prometheus
/gfuzz/bin/inst --dir . --check-syntax-err --recover-syntax-err
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/prometheus/inst
echo "Building tidb"
cd /repos/tidb
/gfuzz/bin/inst --dir . --check-syntax-err --recover-syntax-err
/gfuzz/scripts/gen-testbins.sh $OUTPUT_DIR/tidb/inst
echo "Building moby"
/gfuzz/bin/inst --dir /go/src/github.com/docker/docker --check-syntax-err --recover-syntax-err
export GO111MODULE=off
pkg_list=$(go list github.com/docker/docker/... | grep -vE "(integration)")
for pkg in $pkg_list
do
echo "generating test bin for $pkg"
name=$(echo "$pkg" | sed "s/\//-/g")
go test -c -o $OUTPUT_DIR/moby/inst/$name.test $pkg
done
export GO111MODULE=on