Skip to content

Commit 5bd8bc1

Browse files
authored
pcre2: add run_tests.sh (#13636)
Adds run_tests.sh to the pcre2 project. The PR changes the max match limit. Otherwise the tests fail. `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 `infra/experimental/chronos/check_tests.sh pcre2 c` ``` ... PASS: pcre2posix_test PASS: pcre2_jit_test PASS: RunTest PASS: RunGrepTest ============================================================================ Testsuite summary for PCRE2 10.46-DEV ============================================================================ # TOTAL: 4 # PASS: 4 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ make[3]: Leaving directory '/src/pcre2' make[2]: Leaving directory '/src/pcre2' make[1]: Leaving directory '/src/pcre2' ``` Signed-off-by: Adam Korczynski <adam@adalogics.com>
1 parent 669a8b6 commit 5bd8bc1

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

projects/pcre2/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ RUN apt-get update && apt-get install -y make autoconf automake libtool subversi
1919

2020
RUN git clone --recursive https://github.com/PCRE2Project/pcre2 pcre2
2121
WORKDIR pcre2
22-
COPY build.sh $SRC/
22+
COPY build.sh run_tests.sh $SRC/

projects/pcre2/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# build project
1919
./autogen.sh
2020
./configure --enable-fuzz-support \
21-
--enable-never-backslash-C --with-match-limit=1000 --with-match-limit-depth=1000 \
21+
--enable-never-backslash-C --with-match-limit=1000000 --with-match-limit-depth=1000000 \
2222
--enable-jit \
2323
--enable-pcre2-16 --enable-pcre2-32
2424
make -j$(nproc) clean
@@ -35,7 +35,7 @@ $CXX $CXXFLAGS -o $OUT/pcre2_fuzzer_32 \
3535
# test different link sizes
3636
for i in $(seq 3 4); do
3737
./configure --enable-fuzz-support \
38-
--enable-never-backslash-C --with-match-limit=1000 --with-match-limit-depth=1000 \
38+
--enable-never-backslash-C --with-match-limit=1000000 --with-match-limit-depth=1000000 \
3939
--enable-jit \
4040
--enable-pcre2-16 --enable-pcre2-32 --with-link-size=${i}
4141
make -j$(nproc) clean

projects/pcre2/run_tests.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
make check

0 commit comments

Comments
 (0)