mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-08-21 10:39:52 +00:00
Fix out of source directory checks
This commit fixes out of source directory builds, where in_tf_psa_crypto_repo would fail due to project_name.txt not existing. Signed-off-by: Harry Ramsey <[email protected]>
This commit is contained in:
+13
-7
@@ -404,6 +404,11 @@ cleanup()
|
||||
rm -f programs/test/cmake_package_install/Makefile
|
||||
rm -f programs/test/cmake_package_install/cmake_package_install
|
||||
|
||||
# Remove out of source directory
|
||||
if in_tf_psa_crypto_repo; then
|
||||
rm -rf "$OUT_OF_SOURCE_DIR"
|
||||
fi
|
||||
|
||||
# Restore files that may have been clobbered by the job
|
||||
restore_backed_up_files
|
||||
}
|
||||
@@ -941,7 +946,11 @@ run_component () {
|
||||
"${dd_cmd[@]}"
|
||||
fi
|
||||
|
||||
# Since building TF-PSA-Crypto is out of source, we cannot identify if we
|
||||
# are in TF-PSA-Crypto repository. We set running_tf_psa_crypto_test.
|
||||
running_tf_psa_crypto_test=0
|
||||
if in_tf_psa_crypto_repo; then
|
||||
running_tf_psa_crypto_test=1
|
||||
pre_create_tf_psa_crypto_out_of_source_directory
|
||||
fi
|
||||
|
||||
@@ -978,11 +987,12 @@ run_component () {
|
||||
fi
|
||||
fi
|
||||
|
||||
# Restore the build tree to a clean state.
|
||||
if in_tf_psa_crypto_repo; then
|
||||
cleanup_tf_psa_crypto_out_of_source_directory
|
||||
# Reset working directory to TF_PSA_Crypto as it is build out of source..
|
||||
if [ $running_tf_psa_crypto_test -eq 1 ]; then
|
||||
cd "$TF_PSA_CRYPTO_ROOT_DIR"
|
||||
fi
|
||||
|
||||
# Restore the build tree to a clean state.
|
||||
cleanup
|
||||
unset current_component
|
||||
}
|
||||
@@ -992,10 +1002,6 @@ pre_create_tf_psa_crypto_out_of_source_directory () {
|
||||
mkdir "$OUT_OF_SOURCE_DIR"
|
||||
cd "$OUT_OF_SOURCE_DIR"
|
||||
}
|
||||
cleanup_tf_psa_crypto_out_of_source_directory () {
|
||||
cd "$TF_PSA_CRYPTO_ROOT_DIR"
|
||||
rm -rf "$OUT_OF_SOURCE_DIR"
|
||||
}
|
||||
|
||||
################################################################
|
||||
#### Main
|
||||
|
||||
Reference in New Issue
Block a user