summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2019-05-04 17:14:32 -0700
committerArmin Kuster <akuster808@gmail.com>2019-05-05 10:39:53 -0700
commit62b34d4dee35488c16616331d39da3a294e0e5e0 (patch)
treed27d85a8b9b36662f637b7f32a44969d53793507
parentae2be89c25087345975b1b56433348b17de96118 (diff)
downloadopenembedded-core-contrib-akuster/pkg_test.tar.gz
openembedded-core-contrib-akuster/pkg_test.tar.bz2
openembedded-core-contrib-akuster/pkg_test.zip
nss: add ptest supportakuster/pkg_test
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta/recipes-support/nss/nss/oe_ptest_fixup.patch26
-rw-r--r--meta/recipes-support/nss/nss/run-ptest3
-rw-r--r--meta/recipes-support/nss/nss_3.43.bb10
3 files changed, 38 insertions, 1 deletions
diff --git a/meta/recipes-support/nss/nss/oe_ptest_fixup.patch b/meta/recipes-support/nss/nss/oe_ptest_fixup.patch
new file mode 100644
index 0000000000..10b9e90035
--- /dev/null
+++ b/meta/recipes-support/nss/nss/oe_ptest_fixup.patch
@@ -0,0 +1,26 @@
+Index: nss-3.43/nss/tests/common/init.sh
+===================================================================
+--- nss-3.43.orig/nss/tests/common/init.sh
++++ nss-3.43/nss/tests/common/init.sh
+@@ -267,7 +267,7 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOU
+ COMMON=${TEST_COMMON-$common}
+ export COMMON
+
+- DIST=${DIST-${MOZILLA_ROOT}/dist}
++ DIST=/usr
+ TESTDIR=${TESTDIR-${MOZILLA_ROOT}/tests_results/security}
+
+ # Allow for override options from a config file
+Index: nss-3.43/nss/tests/all.sh
+===================================================================
+--- nss-3.43.orig/nss/tests/all.sh
++++ nss-3.43/nss/tests/all.sh
+@@ -303,7 +303,7 @@ if [ $NO_INIT_SUPPORT -eq 0 ]; then
+ RUN_FIPS="fips"
+ fi
+
+-tests="cipher lowhash libpkix cert dbtests tools $RUN_FIPS sdr crmf smime ssl ocsp merge pkits ec gtests ssl_gtests policy"
++tests="cipher lowhash libpkix cert dbtests tools sdr crmf smime ocsp merge pkits ec policy"
+ # Don't run chains tests when we have a gyp build.
+ if [ "$OBJDIR" != "Debug" -a "$OBJDIR" != "Release" ]; then
+ tests="$tests chains"
diff --git a/meta/recipes-support/nss/nss/run-ptest b/meta/recipes-support/nss/nss/run-ptest
new file mode 100644
index 0000000000..7cdfdea9e1
--- /dev/null
+++ b/meta/recipes-support/nss/nss/run-ptest
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+HOST=localhost DOMSUF=localdomain ./tests/all.sh
diff --git a/meta/recipes-support/nss/nss_3.43.bb b/meta/recipes-support/nss/nss_3.43.bb
index f8cf5a46af..41e08cce0d 100644
--- a/meta/recipes-support/nss/nss_3.43.bb
+++ b/meta/recipes-support/nss/nss_3.43.bb
@@ -31,6 +31,8 @@ SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/${VERSIO
file://blank-cert9.db \
file://blank-key4.db \
file://system-pkcs11.txt \
+ file://oe_ptest_fixup.patch \
+ file://run-ptest \
"
SRC_URI[md5sum] = "67c8fa282c32cb56117fdd530dd77001"
@@ -39,7 +41,7 @@ SRC_URI[sha256sum] = "f30bc1b7330887b75de9fec37dbc173001758dc43fb095ffbc45dac409
UPSTREAM_CHECK_URI = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/NSS_Releases"
UPSTREAM_CHECK_REGEX = "NSS_(?P<pver>.+)_release_notes"
-inherit siteinfo
+inherit siteinfo ptest
TD = "${S}/tentative-dist"
TDS = "${S}/tentative-dist-staging"
@@ -227,6 +229,11 @@ do_install_append_class-target() {
install -m 0644 ${WORKDIR}/system-pkcs11.txt ${D}${sysconfdir}/pki/nssdb/pkcs11.txt
}
+do_install_ptest () {
+ install -d ${D}${PTEST_PATH}/tests
+ cp -a ${S}/nss/tests/* ${D}${PTEST_PATH}/tests/.
+}
+
PACKAGE_WRITE_DEPS += "nss-native"
pkg_postinst_${PN} () {
if [ -n "$D" ]; then
@@ -263,5 +270,6 @@ FILES_${PN}-dev = "\
"
RDEPENDS_${PN}-smime = "perl"
+RDEPENDS_${PN}-ptest = "nss bash tcsh make perl"
BBCLASSEXTEND = "native nativesdk"