summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2016-09-23 15:23:20 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-24 07:30:09 +0100
commit6b8d16c6ebe90dae2c3595f18f3878c3d7a5a15c (patch)
tree2db76ff16eadd4c99ad27481503e42e9b1f402d5
parentd9e1bb679eb4d625a751ad668a18eaaefeaed850 (diff)
downloadpoky-6b8d16c6ebe90dae2c3595f18f3878c3d7a5a15c.tar.gz
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. (From OE-Core rev: 101e2a5e0b7822ca3de3d3a73369405c05ab3c5b) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-connectivity/openssl/openssl.inc13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl.inc b/meta/recipes-connectivity/openssl/openssl.inc
index cb7ec0aac2..f3a2c5abd7 100644
--- a/meta/recipes-connectivity/openssl/openssl.inc
+++ b/meta/recipes-connectivity/openssl/openssl.inc
@@ -216,6 +216,19 @@ do_install_ptest () {
216 mkdir -p ${D}${PTEST_PATH}/util 216 mkdir -p ${D}${PTEST_PATH}/util
217 install util/opensslwrap.sh ${D}${PTEST_PATH}/util 217 install util/opensslwrap.sh ${D}${PTEST_PATH}/util
218 install util/shlib_wrap.sh ${D}${PTEST_PATH}/util 218 install util/shlib_wrap.sh ${D}${PTEST_PATH}/util
219 # Time stamps are relevant for "make alltests", otherwise
220 # make may try to recompile binaries. Not only must the
221 # binary files be newer than the sources, they also must
222 # be more recent than the header files in /usr/include.
223 #
224 # Using "cp -a" is not sufficient, because do_install
225 # does not preserve the original time stamps.
226 #
227 # So instead of using the original file stamps, we set
228 # the current time for all files. Binaries will get
229 # modified again later when stripping them, but that's okay.
230 touch ${D}${PTEST_PATH}
231 find ${D}${PTEST_PATH} -type f -print0 | xargs --verbose -0 touch -r ${D}${PTEST_PATH}
219} 232}
220 233
221do_install_append_class-native() { 234do_install_append_class-native() {