Skip to content

Commit 7a113df

Browse files
authored
opensc: add run_tests.sh (#13604)
Adds run_tests.sh to the opensc 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 `infra/experimental/chronos/check_tests.sh opensc c` ``` PASS: test-manpage.sh PASS: test-duplicate-symbols.sh SKIP: test-pkcs11-tool-test-threads.sh SKIP: test-pkcs11-tool-allowed-mechanisms.sh SKIP: test-pkcs11-tool-sym-crypt-test.sh SKIP: test-pkcs11-tool-test.sh SKIP: test-pkcs11-tool-sign-verify.sh SKIP: test-pkcs11-tool-unwrap-wrap-test.sh SKIP: test-pkcs11-tool-import.sh ============================================================================ Testsuite summary for OpenSC 0.26.1 ============================================================================ # TOTAL: 9 # PASS: 2 # SKIP: 7 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ make[3]: Leaving directory '/src/opensc/tests' make[2]: Leaving directory '/src/opensc/tests' make[1]: Leaving directory '/src/opensc/tests' make[1]: Entering directory '/src/opensc' make[1]: Nothing to be done for 'check-am'. make[1]: Leaving directory '/src/opensc ``` Signed-off-by: Adam Korczynski <adam@adalogics.com>
1 parent 6f307a9 commit 7a113df

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

projects/opensc/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FROM gcr.io/oss-fuzz-base/base-builder
1818
RUN apt-get update && apt-get install -y pcscd libccid libpcsclite-dev libssl-dev libreadline-dev autoconf automake build-essential docbook-xsl xsltproc libtool pkg-config zlib1g-dev
1919
RUN git clone --depth 1 --single-branch --branch master https://github.com/OpenSC/OpenSC opensc
2020
WORKDIR opensc
21-
COPY build.sh $SRC/
21+
COPY build.sh run_tests.sh $SRC/

projects/opensc/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
./bootstrap
1919
# FIXME FUZZING_LIBS="$LIB_FUZZING_ENGINE" fails with some missing C++ library, I don't know how to fix this
20-
./configure --disable-optimization --disable-shared --disable-pcsc --enable-ctapi --enable-fuzzing FUZZING_LIBS="$LIB_FUZZING_ENGINE"
20+
./configure --enable-tests --disable-optimization --disable-shared --disable-pcsc --enable-ctapi --enable-fuzzing FUZZING_LIBS="$LIB_FUZZING_ENGINE"
2121
make -j4
2222

2323
fuzzerFiles=$(find $SRC/opensc/src/tests/fuzzing/ -name "fuzz_*.c")

projects/opensc/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)