Skip to content

Commit 7e8e023

Browse files
authored
args: add run_tests.sh (#13648)
Adds `run_tests.sh` to the args 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 args c++: ``` Test project /src/args/build Start 1: test 1/2 Test #1: test ............................. Passed 0.27 sec Start 2: test-multiple-inclusion 2/2 Test #2: test-multiple-inclusion .......... Passed 0.06 sec 100% tests passed, 0 tests failed out of 2 Total Test time (real) = 0.34 sec ```
1 parent efc0296 commit 7e8e023

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

projects/args/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ RUN apt-get update && \
2323

2424
RUN git clone --depth 1 https://github.com/Taywee/args.git $SRC/args/
2525

26-
COPY build.sh $SRC/
26+
COPY build.sh run_tests.sh $SRC/
2727
WORKDIR $SRC/args/
2828

projects/args/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 -DARGS_BUILD_TESTS=ON ..
2323
make -j4
2424

2525
for fuzzer in $(find $SRC/args/fuzz/ -name "*_fuzzer.cpp"); do

projects/args/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+
ctest --output-on-failure

0 commit comments

Comments
 (0)