diff options
| author | Ross Burton <ross.burton@intel.com> | 2018-10-19 20:43:17 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-20 22:40:16 +0100 |
| commit | b75a0a8d825b68b08587e040b60e80ce6b7c1f2d (patch) | |
| tree | 50094c91a5fb01bd746b650e500d59fe41a22d5d | |
| parent | 2713d9bcc39c712ef34003ce8424416441be558e (diff) | |
| download | poky-b75a0a8d825b68b08587e040b60e80ce6b7c1f2d.tar.gz | |
openssl: fix ptest
Previously the ptest installation was simply a copy of the entire build tree,
which is terribly ugly.
Instead copy just the pieces we need, symlink to /usr as appropriate, and add
missing dependencies. Remove PRIVATE_LIBS as we don't ship copies of the
libraries now.
Also remember to do 'set -x' in run-ptest, so if the tests fail the runner
knows!
[ YOCTO #12965 ]
[ YOCTO #12967 ]
(From OE-Core rev: 7831d2d3a1069b9d3a8d32e41f0a292e1add56ba)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-connectivity/openssl/openssl/run-ptest | 14 | ||||
| -rw-r--r-- | meta/recipes-connectivity/openssl/openssl_1.1.1.bb | 20 |
2 files changed, 27 insertions, 7 deletions
diff --git a/meta/recipes-connectivity/openssl/openssl/run-ptest b/meta/recipes-connectivity/openssl/openssl/run-ptest index 65c6cc7b86..0a620dea74 100644 --- a/meta/recipes-connectivity/openssl/openssl/run-ptest +++ b/meta/recipes-connectivity/openssl/openssl/run-ptest | |||
| @@ -1,4 +1,12 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | cd test | 2 | |
| 3 | OPENSSL_ENGINES=../engines BLDTOP=.. SRCTOP=.. perl run_tests.pl | 3 | set -e |
| 4 | cd .. | 4 | |
| 5 | # Optional arguments are 'list' to lists all tests, or the test name (base name | ||
| 6 | # ie test_evp, not 03_test_evp.t). | ||
| 7 | |||
| 8 | export TOP=. | ||
| 9 | # OPENSSL_ENGINES is relative from the test binaries | ||
| 10 | export OPENSSL_ENGINES=../engines | ||
| 11 | |||
| 12 | perl ./test/run_tests.pl $* | ||
diff --git a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb index 0d80aba64d..4516f61021 100644 --- a/meta/recipes-connectivity/openssl/openssl_1.1.1.bb +++ b/meta/recipes-connectivity/openssl/openssl_1.1.1.bb | |||
| @@ -151,10 +151,22 @@ do_install_append_class-nativesdk () { | |||
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | do_install_ptest () { | 153 | do_install_ptest () { |
| 154 | cp -r * ${D}${PTEST_PATH} | 154 | cp ${B}/Configure ${B}/configdata.pm ${D}${PTEST_PATH} |
| 155 | } | 155 | # TODO fuzz needs to be pruned of non-binaries |
| 156 | cp -r ${B}/external ${B}/test ${B}/fuzz ${B}/util ${D}${PTEST_PATH} | ||
| 157 | |||
| 158 | # For test_shlibload | ||
| 159 | ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/libcrypto.so | ||
| 160 | ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/libssl.so | ||
| 156 | 161 | ||
| 157 | PRIVATE_LIBS_${PN}-ptest = "libcrypto.so.1.1 libssl.so.1.1" | 162 | install -d ${D}${PTEST_PATH}/apps |
| 163 | ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps | ||
| 164 | install -m644 ${B}/apps/*.pem ${B}/apps/*.srl ${B}/apps/openssl.cnf ${D}${PTEST_PATH}/apps | ||
| 165 | install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps | ||
| 166 | |||
| 167 | install -d ${D}${PTEST_PATH}/engines | ||
| 168 | install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines | ||
| 169 | } | ||
| 158 | 170 | ||
| 159 | # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto | 171 | # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto |
| 160 | # package RRECOMMENDS on this package. This will enable the configuration | 172 | # package RRECOMMENDS on this package. This will enable the configuration |
| @@ -176,7 +188,7 @@ CONFFILES_openssl-conf = "${sysconfdir}/ssl/openssl.cnf" | |||
| 176 | RRECOMMENDS_libcrypto += "openssl-conf" | 188 | RRECOMMENDS_libcrypto += "openssl-conf" |
| 177 | RDEPENDS_${PN}-bin = "perl" | 189 | RDEPENDS_${PN}-bin = "perl" |
| 178 | RDEPENDS_${PN}-misc = "perl" | 190 | RDEPENDS_${PN}-misc = "perl" |
| 179 | RDEPENDS_${PN}-ptest += "perl-module-file-spec-functions bash python" | 191 | RDEPENDS_${PN}-ptest += "openssl-bin perl perl-modules bash python" |
| 180 | 192 | ||
| 181 | RPROVIDES_openssl-conf = "openssl10-conf" | 193 | RPROVIDES_openssl-conf = "openssl10-conf" |
| 182 | RREPLACES_openssl-conf = "openssl10-conf" | 194 | RREPLACES_openssl-conf = "openssl10-conf" |
