Skip to content

Commit d83ec8b

Browse files
authored
yaml-cpp: add run_tests.sh (google#13591)
Adds `run_tests.sh` to the expat project. `run_tests.sh` is used as part of Chronos with cached builds: https://github.com/google/oss-fuzz/tree/master/infra/experimental/chronos#check-tests Output of ./infra/experimental/chronos/check_tests.sh yaml-cpp c++: ``` Running tests... Test project /src/yaml-cpp/build Start 1: yaml-cpp::test 1/1 Test #1: yaml-cpp::test ................... Passed 1.32 sec 100% tests passed, 0 tests failed out of 1 Total Test time (real) = 1.32 sec ```
1 parent 0c30de7 commit d83ec8b

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

projects/yaml-cpp/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ RUN apt-get update && \
2424
RUN git clone --depth 1 https://github.com/jbeder/yaml-cpp.git $SRC/yaml-cpp/
2525
RUN git clone --depth 1 https://github.com/initializedd/yaml-cpp-fuzzer.git $SRC/yaml-cpp-fuzzer/
2626

27-
COPY build.sh $SRC/
27+
COPY build.sh run_tests.sh $SRC/
2828
WORKDIR $SRC/yaml-cpp/
2929

projects/yaml-cpp/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
mkdir build
2020
cd build
2121

22-
cmake -DCMAKE_BUILD_TYPE=Release ..
22+
cmake -DCMAKE_BUILD_TYPE=Release -DYAML_CPP_BUILD_TESTS=ON ..
2323
make -j4
2424

2525
cp $SRC/yaml-cpp-fuzzer/*.dict $OUT/

projects/yaml-cpp/run_tests.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash -eu
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
################################################################################
16+
17+
cd build
18+
make test

0 commit comments

Comments
 (0)