File tree Expand file tree Collapse file tree 7 files changed +80
-5
lines changed
Expand file tree Collapse file tree 7 files changed +80
-5
lines changed Original file line number Diff line number Diff line change @@ -18,5 +18,5 @@ FROM gcr.io/oss-fuzz-base/base-builder
1818
1919RUN git clone --depth 1 https://github.com/google/glog
2020
21- COPY build.sh $SRC/
21+ COPY run_tests.sh build.sh $SRC/
2222WORKDIR $SRC/glog
Original file line number Diff line number Diff line change 1+ #! /bin/bash -eu
2+ #
3+ # Copyright 2026 Google LLC
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+ #
17+ # ###############################################################################
18+
19+ ctest --test-dir build -E " stacktrace|symbolize|includes_logging|includes_vlog_is_on|includes_raw_logging"
Original file line number Diff line number Diff line change @@ -38,5 +38,5 @@ RUN mkdir /deps && \
3838 make install && \
3939 cp .libs/libxml2.a /deps/
4040
41- COPY build.sh libarchive_fuzzer.cc $SRC/
41+ COPY run_tests.sh build.sh libarchive_fuzzer.cc $SRC/
4242WORKDIR $SRC
Original file line number Diff line number Diff line change 1+ #! /bin/bash -eu
2+ #
3+ # Copyright 2026 Google LLC
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+ #
17+ # ###############################################################################
18+
19+ # Skip leak sanitizer and disable possible null return from allocator
20+ export ASAN_OPTIONS=" detect_leaks=0:allocator_may_return_null=1"
21+
22+ # Run unit test and disable those tests that are failing or not able to run without network connection
23+ ctest --test-dir libarchive/build2 -j$( nproc) -E \
24+ " libarchive_test_compat_zip_4|libarchive_test_read_format_cpio_bin*|libarchive_test_read_pax_truncated|bsdcpio_test_basic|bsdcpio_test_option_0|bsdcpio_test_option_L_upper|bsdcpio_test_option_d|bsdcpio_test_option_f|bsdcpio_test_option_m|bsdcpio_test_option_t"
Original file line number Diff line number Diff line change 1515# ###############################################################################
1616
1717FROM gcr.io/oss-fuzz-base/base-builder
18+ RUN apt-get update && apt-get install -y libboost-dev libboost-test-dev \
19+ libboost-system-dev libboost-chrono-dev
1820RUN git clone https://github.com/spotify/spotify-json
1921
2022WORKDIR $SRC/spotify-json
21- COPY build.sh $SRC/
23+ COPY run_tests.sh build.sh $SRC/
Original file line number Diff line number Diff line change 1515#
1616# ###############################################################################
1717
18- mkdir build && cd build
18+ # Build spotify-json
19+ mkdir build
20+ pushd build
1921cmake -DSPOTIFY_JSON_BUILD_TESTS=OFF ../
20- make
22+ make -j $( nproc ) spotify-json
2123
2224$CXX $CXXFLAGS $LIB_FUZZING_ENGINE ../fuzzers//fuzz_decode.cpp \
2325 -I../include -I../vendor/double-conversion \
2426 ./libspotify-json.a ./vendor/double-conversion/libdouble-conversion.a -lpthread -o $OUT /fuzz_decode
27+ popd
28+
29+ # Build unit testing and benchmark which is incompatible with major build with fuzzing sanitizer
30+ mkdir build-tests
31+ pushd build-tests
32+ unset CXXFLAGS
33+ cmake -DSPOTIFY_JSON_BUILD_TESTS=ON -DCMAKE_CXX_FLAGS=' -stdlib=libstdc++' ../
34+ make -j$( nproc) spotify_json_test json_benchmark
35+ popd
Original file line number Diff line number Diff line change 1+ #! /bin/bash -eu
2+ #
3+ # Copyright 2026 Google LLC
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+ #
17+ # ###############################################################################
18+
19+ make test -C $SRC /spotify-json/build-tests -j$( nproc)
You can’t perform that action at this time.
0 commit comments