mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-05 19:35:48 +03:00
Ensure tests will fail if CMake generation fails
Remove the in-source-tree generated files before running CMake. Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
@@ -5176,11 +5176,16 @@ support_test_cmake_out_of_source () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
component_test_cmake_out_of_source () {
|
component_test_cmake_out_of_source () {
|
||||||
|
# remove existing generated files so that we use the ones cmake
|
||||||
|
# generates
|
||||||
|
make neat
|
||||||
|
|
||||||
msg "build: cmake 'out-of-source' build"
|
msg "build: cmake 'out-of-source' build"
|
||||||
MBEDTLS_ROOT_DIR="$PWD"
|
MBEDTLS_ROOT_DIR="$PWD"
|
||||||
mkdir "$OUT_OF_SOURCE_DIR"
|
mkdir "$OUT_OF_SOURCE_DIR"
|
||||||
cd "$OUT_OF_SOURCE_DIR"
|
cd "$OUT_OF_SOURCE_DIR"
|
||||||
cmake -D CMAKE_BUILD_TYPE:String=Check "$MBEDTLS_ROOT_DIR"
|
# Note: Explicitly generate files as these are turned off in releases
|
||||||
|
cmake -D CMAKE_BUILD_TYPE:String=Check -D GEN_FILES=ON "$MBEDTLS_ROOT_DIR"
|
||||||
make
|
make
|
||||||
|
|
||||||
msg "test: cmake 'out-of-source' build"
|
msg "test: cmake 'out-of-source' build"
|
||||||
@@ -5201,9 +5206,14 @@ component_test_cmake_out_of_source () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
component_test_cmake_as_subdirectory () {
|
component_test_cmake_as_subdirectory () {
|
||||||
|
# Remove existing generated files so that we use the ones CMake
|
||||||
|
# generates
|
||||||
|
make neat
|
||||||
|
|
||||||
msg "build: cmake 'as-subdirectory' build"
|
msg "build: cmake 'as-subdirectory' build"
|
||||||
cd programs/test/cmake_subproject
|
cd programs/test/cmake_subproject
|
||||||
cmake .
|
# Note: Explicitly generate files as these are turned off in releases
|
||||||
|
cmake -D GEN_FILES=ON .
|
||||||
make
|
make
|
||||||
./cmake_subproject
|
./cmake_subproject
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user