Skip to content

Commit e78c2e2

Browse files
authored
Use new strategy for replaying builds. (#13439)
Results: https://gist.github.com/oliverchang/5bfb9dda05f718fc237b72878ce91752 (tested from #13438). There's a small number of regressions which I'll address later, but overwhelmingly this seems like a better approach to iterate on.
1 parent 218bfc8 commit e78c2e2

File tree

4 files changed

+2
-248
lines changed

4 files changed

+2
-248
lines changed

infra/base-images/base-builder/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ COPY bazel_build_fuzz_tests \
178178
install_rust.sh \
179179
install_swift.sh \
180180
python_coverage_helper.py \
181-
bash_parser.py \
182181
srcmap \
183182
write_labels.py \
184183
make_build_replayable.py \

infra/base-images/base-builder/bash_parser.py

Lines changed: 0 additions & 235 deletions
This file was deleted.

infra/base-images/base-builder/compile

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -289,17 +289,6 @@ if [ "${OSS_FUZZ_ON_DEMAND}" != "0" ]; then
289289
exit 0
290290
fi
291291

292-
293-
if [[ ! -z "${CAPTURE_REPLAY_SCRIPT-}" ]]; then
294-
# Capture a replaying build script which can be used for replaying the build
295-
# after a vanilla build. This script is meant to be used in a cached
296-
# container.
297-
if [[ ! -f $SRC/replay_build.sh ]]; then
298-
python3 -m pip install bashlex
299-
python3 /usr/local/bin/bash_parser.py $SRC/build.sh
300-
fi
301-
fi
302-
303292
# Prepare the build command to run the project's build script.
304293
if [[ ! -z "${REPLAY_ENABLED-}" ]]; then
305294
# If this is a replay, then use replay_build.sh. This is expected to be

infra/experimental/chronos/build_cache_local.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ docker run \
4949
--name=${_PROJECT}-origin-${_SANITIZER} \
5050
-v=$PWD/ccaches/${_PROJECT}/ccache:/workspace/ccache \
5151
-v=$PWD/build/out/${_PROJECT}/:/out/ \
52+
-v=$BASE/infra/experimental/chronos:/chronos/ \
5253
gcr.io/oss-fuzz/${_PROJECT} \
5354
/bin/bash -c \
54-
"export PATH=/ccache/bin:\$PATH && compile"
55+
"export PATH=/ccache/bin:\$PATH && compile && cp /chronos/replay_build.sh \$SRC/"
5556
B_TIME=$(($SECONDS - $B_START))
5657

5758
# Step 3: save (commit, locally) the cached container as an image

0 commit comments

Comments
 (0)