File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -ex
4
4
5
+ # Store the current directory.
6
+ CURL_FUZZER_DIR=$( pwd)
7
+
5
8
PROJECT_NAME=curl
6
9
7
10
# Clone the oss-fuzz repository
@@ -10,11 +13,13 @@ git clone https://github.com/google/oss-fuzz.git /tmp/ossfuzz
10
13
# Work out which branch to clone from, inside Docker
11
14
BRANCH=${GITHUB_REF}
12
15
13
- # Modify the oss-fuzz Dockerfile so that we're checking out the current reference on CI.
14
- sed -i " s@RUN git clone --depth 1 https://github.com/curl/curl-fuzzer.git /src/curl_fuzzer@RUN git config --global remote.origin.fetch '+refs/pull/*:refs/remotes/origin/pull/*' \&\& git clone https://github.com/curl/curl-fuzzer.git /src/ curl_fuzzer \&\& cd /src/curl_fuzzer \&\& git checkout -b ${BRANCH} @" /tmp/ossfuzz/projects/${PROJECT_NAME} /Dockerfile
16
+ # Modify the oss-fuzz Dockerfile so that we're using the checked-out code from CI
17
+ sed -i " s@RUN git clone --depth 1 https://github.com/curl/curl-fuzzer.git /src/curl_fuzzer@COPY ./ curl_fuzzer /src/curl_fuzzer@" /tmp/ossfuzz/projects/${PROJECT_NAME} /Dockerfile
15
18
16
- # Try and build the fuzzers
19
+ # Try and build the fuzzers. Need to copy the fuzzer directory to the
20
+ # build context first.
17
21
pushd /tmp/ossfuzz
22
+ cp -r ${CURL_FUZZER_DIR} projects/curl/curl_fuzzer
18
23
python3 infra/helper.py build_image --pull ${PROJECT_NAME}
19
24
python3 infra/helper.py build_fuzzers ${PROJECT_NAME}
20
25
python3 infra/helper.py check_build ${PROJECT_NAME} --engine libfuzzer --sanitizer address --architecture x86_64
You can’t perform that action at this time.
0 commit comments