mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 09:05:39 +01:00
Stop CMake out of source tests running on 16.04
Running the out of source CMake test on Ubuntu 16.04 using more than one processor (as the CI does) can create a race condition whereby the build fails to see a generated file, despite that file actually having been generated. This problem appears to go away with 18.04 or newer, so make the out of source tests not supported on Ubuntu 16.04 Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
1a3540afbe
commit
2ab9a7a57a
4
ChangeLog.d/stop_cmake_out_of_build_running_on_16.04.txt
Normal file
4
ChangeLog.d/stop_cmake_out_of_build_running_on_16.04.txt
Normal file
@ -0,0 +1,4 @@
|
||||
Bugfix
|
||||
* Prevent CMake out of source tests from running on Ubuntu 16.04, as this can
|
||||
cause failures due to race conditions with generated files.
|
||||
|
@ -2940,6 +2940,36 @@ component_test_valgrind () {
|
||||
fi
|
||||
}
|
||||
|
||||
support_test_cmake_out_of_source () {
|
||||
distrib_id=""
|
||||
distrib_ver=""
|
||||
distrib_ver_minor=""
|
||||
distrib_ver_major=""
|
||||
|
||||
# Attempt to parse lsb-release to find out distribution and version. If not
|
||||
# found this should fail safe (test is supported).
|
||||
if [[ -f /etc/lsb-release ]]; then
|
||||
|
||||
while read -r lsb_line; do
|
||||
case "$lsb_line" in
|
||||
"DISTRIB_ID"*) distrib_id=${lsb_line/#DISTRIB_ID=};;
|
||||
"DISTRIB_RELEASE"*) distrib_ver=${lsb_line/#DISTRIB_RELEASE=};;
|
||||
esac
|
||||
done < /etc/lsb-release
|
||||
|
||||
distrib_ver_major="${distrib_ver%%.*}"
|
||||
distrib_ver="${distrib_ver#*.}"
|
||||
distrib_ver_minor="${distrib_ver%%.*}"
|
||||
fi
|
||||
|
||||
# Running the out of source CMake test on Ubuntu 16.04 using more than one
|
||||
# processor (as the CI does) can create a race condition whereby the build
|
||||
# fails to see a generated file, despite that file actually having been
|
||||
# generated. This problem appears to go away with 18.04 or newer, so make
|
||||
# the out of source tests unsupported on Ubuntu 16.04.
|
||||
[ "$distrib_id" != "Ubuntu" ] || [ "$distrib_ver_major" -gt 16 ]
|
||||
}
|
||||
|
||||
component_test_cmake_out_of_source () {
|
||||
msg "build: cmake 'out-of-source' build"
|
||||
MBEDTLS_ROOT_DIR="$PWD"
|
||||
|
Loading…
Reference in New Issue
Block a user