[oe-commits] [openembedded-core] 08/14: openssl.inc: avoid random ptest failures

git at git.openembedded.org git at git.openembedded.org
Fri Sep 23 14:28:35 UTC 2016


rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 20d8275d6770511dea40a69b23509db5c700d33f
Author: Patrick Ohly <patrick.ohly at intel.com>
AuthorDate: Fri Sep 23 15:23:20 2016 +0200

    openssl.inc: 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.
    
    Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-connectivity/openssl/openssl.inc | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index cb7ec0a..f3a2c5a 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -216,6 +216,19 @@ do_install_ptest () {
 	mkdir -p ${D}${PTEST_PATH}/util
 	install util/opensslwrap.sh    ${D}${PTEST_PATH}/util
 	install util/shlib_wrap.sh     ${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() {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list