Skip to content

Commit

Permalink
Fixes after more thorough testing
Browse files Browse the repository at this point in the history
  • Loading branch information
lrstewart committed Sep 29, 2023
1 parent bd9b552 commit 9ea27cf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,15 @@ if (BUILD_TESTING)
endif()
set(UNIT_TEST_ENVS ${UNIT_TEST_ENVS} TSAN_OPTIONS=${TSAN_OPTIONS})
endif()
if(ASAN)
# Some of our unit tests intentionally include *.c files for testing,
# resulting in duplicate global values.
set(ASAN_OPTIONS detect_odr_violation=0)
if(DEFINED ENV{ASAN_OPTIONS})
set(ASAN_OPTIONS "${ASAN_OPTIONS} $ENV{ASAN_OPTIONS}")
endif()
set(UNIT_TEST_ENVS ${UNIT_TEST_ENVS} ASAN_OPTIONS=${ASAN_OPTIONS})
endif()
message(STATUS "Running tests with environment: ${UNIT_TEST_ENVS}")

file(GLOB UNITTESTS_SRC "tests/unit/*.c")
Expand Down
11 changes: 7 additions & 4 deletions codebuild/spec/buildspec_ktls.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
---
version: 0.2
env:
variables:
S2N_KTLS_TESTING_EXPECTED: true
phases:
install:
commands:
Expand All @@ -17,4 +14,10 @@ phases:
build:
commands:
- codebuild-breakpoint
- ssh -p 2222 codebuild@localhost "cd s2n-tls; sudo modprobe tls; nix develop .#openssl111 --command bash -c 'source ./nix/shell.sh && clean && configure && build && unit'"
- |
ssh -p 2222 codebuild@localhost \
"cd s2n-tls; sudo modprobe tls; \
export S2N_CMAKE_OPTIONS=${S2N_CMAKE_OPTIONS}; \
export S2N_KTLS_TESTING_EXPECTED=1; \
nix develop .#openssl111 --command bash -c \
'source ./nix/shell.sh && clean && configure && build && unit'"

0 comments on commit 9ea27cf

Please sign in to comment.