Skip to content

Commit

Permalink
Make explicit EC tests off by default
Browse files Browse the repository at this point in the history
Signed-off-by: Lucas Mulling <[email protected]>
  • Loading branch information
Mulling committed Dec 27, 2024
1 parent 877518b commit 699459a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ jobs:
git config --global --add safe.directory \
/__w/pkcs11-provider/pkcs11-provider
git submodule update --init
CC=${{ matrix.compiler }} meson setup builddir
if [ -f /etc/fedora-release ]; then
CC=${{ matrix.compiler }} meson setup builddir
else
CC=${{ matrix.compiler }} meson setup builddir -Denable_explicit_EC_test=true
fi
- name: Build and Test
if : ( steps.nss-version-check.outputs.skiptest != 'true' )
run: |
Expand Down
4 changes: 2 additions & 2 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ option('preload_libasan',
value: 'no',
description: 'Path to libasan.so to preload')

option('disable_explicit_EC_test',
option('enable_explicit_EC_test',
type: 'boolean',
value: false,
description: 'Disable explicit EC tests')
description: 'Enable explicit EC tests')
8 changes: 4 additions & 4 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ if nss_softokn.found()
endif
endif

if get_option('disable_explicit_EC_test')
conf_env.set('DISABLE_EXPLICIT_EC_TEST', '1')
if get_option('enable_explicit_EC_test')
conf_env.set('ENABLE_EXPLICIT_EC_TEST', '1')
endif

setup_script=find_program('setup.sh')
Expand All @@ -51,8 +51,8 @@ test_env = environment({
'TESTBLDDIR': meson.current_build_dir(),
})

if get_option('disable_explicit_EC_test')
test_env.set('DISABLE_EXPLICIT_EC_TEST', '1')
if get_option('enable_explicit_EC_test')
test_env.set('ENABLE_EXPLICIT_EC_TEST', '1')
endif

valgrind = find_program('valgrind', required: false)
Expand Down
2 changes: 1 addition & 1 deletion tests/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ echo "${ECPRI2URI}"
echo "${ECCRT2URI}"
echo ""

if [ -n "${DISABLE_EXPLICIT_EC_TEST}" ]; then
if [ -z "${ENABLE_EXPLICIT_EC_TEST}" ]; then
title PARA "explicit EC unsupported"
elif [ "${TOKENTYPE}" == "softokn" ]; then
title PARA "explicit EC unsupported with softokn"
Expand Down
4 changes: 2 additions & 2 deletions tests/tecxc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# SPDX-License-Identifier: Apache-2.0

# Some distributions completely removed support for explicit EC from libcrypto.
# If `-Ddisable_explicit_EC_test=true` is set, skip the test.
if [ -n "${DISABLE_EXPLICIT_EC_TEST}" ]; then
# If `-Denable_explicit_EC_test=true` is not set, skip the test.
if [ -z "${ENABLE_EXPLICIT_EC_TEST}" ]; then
exit 0
fi

Expand Down

0 comments on commit 699459a

Please sign in to comment.