Skip to content

Commit 32fc19a

Browse files
committed
Fix ws:// url to be localhost, and fix Dockerfile modification
The ci_oss.sh script wasn't usefully editing the Dockerfile - now it uses the checked-out code in the Dockerfile build.
1 parent 6c3bb7c commit 32fc19a

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

ci_oss.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
set -ex
44

5+
# Store the current directory.
6+
CURL_FUZZER_DIR=$(pwd)
7+
58
PROJECT_NAME=curl
69

710
# Clone the oss-fuzz repository
@@ -10,11 +13,13 @@ git clone https://github.com/google/oss-fuzz.git /tmp/ossfuzz
1013
# Work out which branch to clone from, inside Docker
1114
BRANCH=${GITHUB_REF}
1215

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
1518

16-
# Try and build the fuzzers
19+
# Try and build the fuzzers. Need to copy the fuzzer directory to the
20+
# build context first.
1721
pushd /tmp/ossfuzz
22+
cp -r ${CURL_FUZZER_DIR} projects/curl/curl_fuzzer
1823
python3 infra/helper.py build_image --pull ${PROJECT_NAME}
1924
python3 infra/helper.py build_fuzzers ${PROJECT_NAME}
2025
python3 infra/helper.py check_build ${PROJECT_NAME} --engine libfuzzer --sanitizer address --architecture x86_64

corpora/curl_fuzzer_ws/basictest

4 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)