From 7ea0c13d2ff58894b64b0ca7e23469ea1f4c50f0 Mon Sep 17 00:00:00 2001 From: Justin Smith Date: Tue, 18 Jun 2024 15:36:02 -0400 Subject: [PATCH] Fix testing --- BUILDING.md | 2 +- tests/ci/run_posix_tests.sh | 13 +++++-------- util/build_compilation_database.sh | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 50b797f2319..318b2587911 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -230,7 +230,7 @@ on Linux using SysGenID (https://lkml.org/lkml/2021/3/8/677). This mechanism is used for security hardening. If a SysGenID interface is not found, then the mechanism is ignored. -## Snapsafety Prerequisites +## Snapsafe Prerequisites Snapshots taken on active hosts can potentially be unsafe to use. See "Snapshot Safety Prerequisites" here: https://lkml.org/lkml/2021/3/8/677 diff --git a/tests/ci/run_posix_tests.sh b/tests/ci/run_posix_tests.sh index 37092573c8b..e3c886705b5 100755 --- a/tests/ci/run_posix_tests.sh +++ b/tests/ci/run_posix_tests.sh @@ -27,6 +27,10 @@ build_and_test -DOPENSSL_NO_ASM=1 -DCMAKE_BUILD_TYPE=Release echo "Testing building shared lib." build_and_test -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release +echo "Testing building with a SysGenId." +TEST_SYSGENID_PATH=$(mktemp) +build_and_test -DTEST_SYSGENID_PATH="${TEST_SYSGENID_PATH}" + if [[ "${AWSLC_C99_TEST}" == "1" ]]; then echo "Testing the C99 compatability of AWS-LC headers." ./tests/coding_guidelines/c99_gcc_test.sh @@ -39,14 +43,7 @@ fi # Lightly verify that uncommon build options does not break the build. Fist # define a list of typical build options to verify the special build option with -TEST_SYSGENID_PATH=$(mktemp) -build_options_to_test=( - "" - "-DBUILD_SHARED_LIBS=1" - "-DCMAKE_BUILD_TYPE=Release" - "-DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release" - "-DTEST_SYSGENID_PATH='${TEST_SYSGENID_PATH}'" - ) +build_options_to_test=("" "-DBUILD_SHARED_LIBS=1" "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release") ## Build option: MY_ASSEMBLER_IS_TOO_OLD_FOR_AVX for build_option in "${build_options_to_test[@]}"; do diff --git a/util/build_compilation_database.sh b/util/build_compilation_database.sh index f8e10ed779c..8cd675cf5c0 100755 --- a/util/build_compilation_database.sh +++ b/util/build_compilation_database.sh @@ -12,7 +12,7 @@ MY_CMAKE_FLAGS=("-GNinja" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_EXPORT_COMPILE_COM mkdir -p "${AWS_LC_BUILD}" -cmake "${BASE_DIR}" -B "${AWS_LC_BUILD}" ${MY_CMAKE_FLAGS[@]} ${@} +cmake "${BASE_DIR}" -B "${AWS_LC_BUILD}" ${MY_CMAKE_FLAGS[@]} cmake --build "${AWS_LC_BUILD}" --target all