diff options
authorPatrick Ohly <>2016-09-23 15:23:20 +0200
committerRichard Purdie <>2017-05-18 13:14:22 +0100
commitdd20601980a8709acddb159000cc8d880dc9e047 (patch)
parentd3c0a560a8d82e7a3ec03410a1a5e83eaa6fdbf2 (diff)
poky-dd20601980a8709acddb159000cc8d880dc9e047.tar.bz2 avoid random ptest failures
"make alltests" is sensitive to the timestamps of the installed files. Depending on the order in which cp copies files, .o and/or executables may end up with time stamps older than the source files. Running tests then triggers recompilation attempts, which typically will fail because dev tools and files are not installed. "cp -a" is not enough because the files also have to be newer than the installed header files. Setting the file time stamps to the current time explicitly after copying solves the problem because do_install_ptest_base is guaranteed to run after do_install. (From OE-Core rev: 101e2a5e0b7822ca3de3d3a73369405c05ab3c5b) (From OE-Core rev: b309bfa265456cda7269ff67e9df5f5c05a9a5a5) Signed-off-by: Patrick Ohly <> Signed-off-by: Richard Purdie <> Signed-off-by: Armin Kuster <> Signed-off-by: Richard Purdie <>
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/ b/meta/recipes-connectivity/openssl/
index 20dd74062a..2e2000cc26 100644
--- a/meta/recipes-connectivity/openssl/
+++ b/meta/recipes-connectivity/openssl/
@@ -215,6 +215,19 @@ do_install_ptest () {
mkdir -p ${D}${PTEST_PATH}/util
install util/ ${D}${PTEST_PATH}/util
install util/ ${D}${PTEST_PATH}/util
+ # Time stamps are relevant for "make alltests", otherwise
+ # make may try to recompile binaries. Not only must the
+ # binary files be newer than the sources, they also must
+ # be more recent than the header files in /usr/include.
+ #
+ # Using "cp -a" is not sufficient, because do_install
+ # does not preserve the original time stamps.
+ #
+ # So instead of using the original file stamps, we set
+ # the current time for all files. Binaries will get
+ # modified again later when stripping them, but that's okay.
+ touch ${D}${PTEST_PATH}
+ find ${D}${PTEST_PATH} -type f -print0 | xargs --verbose -0 touch -r ${D}${PTEST_PATH}
do_install_append_class-native() {