Blame SOURCES/nss-versus-softoken-tests.patch

f57139
diff -up nss/tests/all.sh.crypto nss/tests/all.sh
f57139
--- nss/tests/all.sh.crypto	2013-05-28 14:43:24.000000000 -0700
f57139
+++ nss/tests/all.sh	2013-06-13 12:14:12.741082184 -0700
f57139
@@ -299,9 +299,10 @@ fi
f57139
 # created, we check for modutil to know whether the build
f57139
 # is complete. If a new file is created after that, the 
f57139
 # following test for modutil should check for that instead.
f57139
+# Except when building softoken only where shlibsign is the last one built.
f57139
+export LAST_BUILT=[ ${NSS_BUILD_SOFTOKEN_ONLY} -eq "1" ] && shlibsign || modutil
f57139
 
f57139
-if [ ! -f ${DIST}/${OBJDIR}/bin/modutil -a  \
f57139
-     ! -f ${DIST}/${OBJDIR}/bin/modutil.exe ]; then
f57139
+if [ ! -f ${DIST}/${OBJDIR}/bin/${LAST_BUILT}${PROG_SUFFIX} -a ]; then
f57139
     echo "Build Incomplete. Aborting test." >> ${LOGFILE}
f57139
     html_head "Testing Initialization"
f57139
     Exit "Checking for build"
f57139
diff -up nss/tests/cipher/cipher.sh.crypto nss/tests/cipher/cipher.sh
f57139
--- nss/tests/cipher/cipher.sh.crypto	2013-05-28 14:43:24.000000000 -0700
f57139
+++ nss/tests/cipher/cipher.sh	2013-06-13 11:58:00.956064976 -0700
f57139
@@ -129,6 +129,16 @@ if [ ! -x ${DIST}/${OBJDIR}/bin/bltest${
f57139
     return 0
f57139
 fi
f57139
 cipher_init
f57139
-cipher_main
f57139
-cipher_gcm
f57139
+if [ "${NSS_BUILD_SOFTOKEN_ONLY}" = "1" ]; then
f57139
+    echo "Skipping cipher_gcm because this is a softoken only build"
f57139
+    cipher_main
f57139
+elif [ "${NSS_BUILD_WITHOUT_SOFTOKEN}" = "1" ]; then
f57139
+    echo "Skipping cipher_main because this an nss without softoken build"
f57139
+    cipher_gcm
f57139
+else
f57139
+    # default is to run both
f57139
+    cipher_init
f57139
+    cipher_main
f57139
+    cipher_gcm
f57139
+fi
f57139
 cipher_cleanup