[nss-softokn] Select the tests suite to run based on the build type
Elio Maldonado
emaldonado at fedoraproject.org
Thu Jun 13 18:18:59 UTC 2013
commit b01e4d5a3748e6cfb708f4fc5d09e1ec4b8ec349
Author: Elio Maldonado <emaldona at redhat.com>
Date: Thu Jun 13 11:18:02 2013 -0700
Select the tests suite to run based on the build type
nss-softokn.spec | 14 +++++++--
nss-versus-softoken-tests.patch | 46 ++++++++++++++++++++++++++++++
softoken-minimal-test-dependencies.patch | 38 ------------------------
3 files changed, 57 insertions(+), 41 deletions(-)
---
diff --git a/nss-softokn.spec b/nss-softokn.spec
index eed9512..d9497be 100644
--- a/nss-softokn.spec
+++ b/nss-softokn.spec
@@ -25,7 +25,7 @@
Summary: Network Security Services Softoken Module
Name: nss-softokn
Version: 3.15
-Release: 1%{?dist}
+Release: 2%{?dist}
License: MPLv2.0
URL: http://www.mozilla.org/projects/security/pki/nss/
Group: System Environment/Libraries
@@ -66,7 +66,11 @@ Source3: nss-softokn.pc.in
Source4: nss-softokn-config.in
Patch1: build-nss-softoken-only.patch
+# Build only the softoken and freebl related tools
Patch8: softoken-minimal-test-dependencies.patch
+# Select the tests to run based on the type of build
+# TODO: submit this patch upstream
+Patch9: nss-versus-softoken-tests.patch
# This patch uses the gcc-iquote dir option documented at
# http://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#Directory-Options
# to place the in-tree directories at the head of the list on list of directories
@@ -74,7 +78,7 @@ Patch8: softoken-minimal-test-dependencies.patch
# headers are older. Such is the case when we are starting a major update.
# NSSUTIL_INCLUDE_DIR, after all, contains both util and freebl headers.
# Once has been bootstapped the patch may be removed, but it doesn't hurt to keep it.
-Patch9: iquote.patch
+Patch10: iquote.patch
%description
Network Security Services Softoken Cryptographic Module
@@ -126,8 +130,9 @@ Header and library files for doing development with Network Security Services.
%patch1 -p0 -b .softokenonly
%patch8 -p0 -b .crypto
+%patch9 -p0 -b .cryptotests
# activate if needed when doing a major update with new apis
-%patch9 -p0 -b .iquote
+%patch10 -p0 -b .iquote
%build
@@ -381,6 +386,9 @@ done
%{_includedir}/nss3/shsign.h
%changelog
+* Thu Jun 13 2013 Elio Maldonado <emaldona at redhat.com> - 3.15-2
+- Select the tests suite to run based on the build type
+
* Wed May 29 2013 Elio Maldonado <emaldona at redhat.com> - 3.15-1
- Update to NSS_3_15_RTM
diff --git a/nss-versus-softoken-tests.patch b/nss-versus-softoken-tests.patch
new file mode 100644
index 0000000..dcf0693
--- /dev/null
+++ b/nss-versus-softoken-tests.patch
@@ -0,0 +1,46 @@
+diff -up nss/tests/all.sh.crypto nss/tests/all.sh
+--- nss/tests/all.sh.crypto 2013-05-28 14:43:24.000000000 -0700
++++ nss/tests/all.sh 2013-05-30 22:50:36.914426032 -0700
+@@ -294,14 +294,15 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOU
+ . ./init.sh
+ fi
+
++ The last file created depends on the type of build that we did
++last_built = [ -n ${NSS_BUILD_SOFTOKEN_ONLY} ] && shlibsign || modutil
+ # NOTE:
+-# Since in make at the top level, modutil is the last file
+-# created, we check for modutil to know whether the build
++# Since in make at the top level, last_built is the last file
++# created, we check for last_built to know whether the build
+ # is complete. If a new file is created after that, the
+-# following test for modutil should check for that instead.
++# following test for should check for the one instead.
+
+-if [ ! -f ${DIST}/${OBJDIR}/bin/modutil -a \
+- ! -f ${DIST}/${OBJDIR}/bin/modutil.exe ]; then
++if [ ! -f ${DIST}/${OBJDIR}/bin/${last_built}${PROG_SUFFIX} -a ]; then
+ echo "Build Incomplete. Aborting test." >> ${LOGFILE}
+ html_head "Testing Initialization"
+ Exit "Checking for build"
+diff -up nss/tests/cipher/cipher.sh.crypto nss/tests/cipher/cipher.sh
+--- nss/tests/cipher/cipher.sh.crypto 2013-05-28 14:43:24.000000000 -0700
++++ nss/tests/cipher/cipher.sh 2013-05-30 22:56:46.084300872 -0700
+@@ -129,6 +129,16 @@ if [ ! -x ${DIST}/${OBJDIR}/bin/bltest${
+ return 0
+ fi
+ cipher_init
+-cipher_main
+-cipher_gcm
++if [ "${NSS_BUILD_SOFTOKEN_ONLY}" = "1" ]; then
++ echo "Skipping cipher_gcm because this is a softoken only build"
++ cipher_main
++elif [ "${NSS_BUILD_WITHOUT_SOFTOKEN}" = "1" ]; then
++ echo "Skipping cipher_main because this an nss without softoken build"
++ cipher_gcm
++else
++ # default is to run both
++ cipher_init
++ cipher_main
++ cipher_gcm
++fi
+ cipher_cleanup
diff --git a/softoken-minimal-test-dependencies.patch b/softoken-minimal-test-dependencies.patch
index 4bc7404..7de4a5c 100644
--- a/softoken-minimal-test-dependencies.patch
+++ b/softoken-minimal-test-dependencies.patch
@@ -153,41 +153,3 @@ diff -up nss/cmd/platlibs.mk.crypto nss/cmd/platlibs.mk
-L$(NSSUTIL_LIB_DIR) \
-lnssutil3 \
-L$(NSPR_LIB_DIR) \
-diff -up nss/tests/all.sh.crypto nss/tests/all.sh
---- nss/tests/all.sh.crypto 2013-05-28 14:43:24.000000000 -0700
-+++ nss/tests/all.sh 2013-05-29 20:04:30.062145099 -0700
-@@ -294,14 +294,14 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOU
- . ./init.sh
- fi
-
-+last_built = [ -n ${NSS_BUILD_SOFTOKEN_ONLY} ] && shlibsign || modutil
- # NOTE:
--# Since in make at the top level, modutil is the last file
--# created, we check for modutil to know whether the build
-+# Since in make at the top level, ${last_built} is the last file
-+# created, we check for ${last_built} to know whether the build
- # is complete. If a new file is created after that, the
--# following test for modutil should check for that instead.
-+# following test for should check for that instead.
-
--if [ ! -f ${DIST}/${OBJDIR}/bin/modutil -a \
-- ! -f ${DIST}/${OBJDIR}/bin/modutil.exe ]; then
-+if [ ! -f ${DIST}/${OBJDIR}/bin/${last_built}${PROG_SUFFIX} -a ]; then
- echo "Build Incomplete. Aborting test." >> ${LOGFILE}
- html_head "Testing Initialization"
- Exit "Checking for build"
-diff -up nss/tests/cipher/cipher.sh.crypto nss/tests/cipher/cipher.sh
---- nss/tests/cipher/cipher.sh.crypto 2013-05-28 14:43:24.000000000 -0700
-+++ nss/tests/cipher/cipher.sh 2013-05-29 20:09:49.740682762 -0700
-@@ -130,5 +130,10 @@ if [ ! -x ${DIST}/${OBJDIR}/bin/bltest${
- fi
- cipher_init
- cipher_main
--cipher_gcm
-+if [ "${NSS_BUILD_SOFTOKEN_ONLY}" = "1" ]; then
-+ echo "Skipping cipher_gcm because this a softoken only build"
-+else
-+ cipher_gcm
-+
-+fi
- cipher_cleanup
More information about the scm-commits
mailing list