Bug 1370667, automatically run/skip fips tests based on NSS_FORCE_FIPS, r=franziskus
authorKai Engert <kaie@kuix.de>
Mon, 21 Aug 2017 17:20:35 +0200
changeset 13540 0ca145683a7035d8c488ec59a2f11b1b9286b88e
parent 13539 30c6078f307516729317acc64a0f969823db2cde
child 13541 31dfdf2057f881332329fd5df5b884b5fa60603e
push id2332
push userkaie@kuix.de
push dateMon, 21 Aug 2017 15:20:22 +0000
reviewersfranziskus
bugs1370667
Bug 1370667, automatically run/skip fips tests based on NSS_FORCE_FIPS, r=franziskus
tests/all.sh
--- a/tests/all.sh
+++ b/tests/all.sh
@@ -102,16 +102,18 @@
 #   Unlike the old QA this is based on files sourcing each other
 #   This is done to save time, since a great portion of time is lost
 #   in calling and sourcing the same things multiple times over the
 #   network. Also, this way all scripts have all shell function
 #   available and a completely common environment
 #
 ########################################################################
 
+RUN_FIPS=""
+
 ############################## run_tests ###############################
 # run test suites defined in TESTS variable, skip scripts defined in
 # TESTS_SKIP variable
 ########################################################################
 run_tests()
 {
     for TEST in ${TESTS}
     do
@@ -182,17 +184,17 @@ run_cycle_upgrade_db()
     html "</TABLE><BR>"
 
     OLDHOSTDIR="${HOSTDIR}"
     HOSTDIR="${HOSTDIR}/upgradedb"
     mkdir -p "${HOSTDIR}"
     init_directories
 
     if [ -r "${OLDHOSTDIR}/cert.log" ]; then
-        DIRS="alicedir bobdir CA cert_extensions client clientCA dave eccurves eve ext_client ext_server fips SDR server serverCA stapling tools/copydir cert.log cert.done tests.*"
+        DIRS="alicedir bobdir CA cert_extensions client clientCA dave eccurves eve ext_client ext_server $RUN_FIPS SDR server serverCA stapling tools/copydir cert.log cert.done tests.*"
         for i in $DIRS
         do
             cp -r ${OLDHOSTDIR}/${i} ${HOSTDIR} #2> /dev/null
         done
     fi
 
     # upgrade certs dbs to shared db
     TESTS="dbupgrade"
@@ -268,17 +270,22 @@ run_cycles()
     done
 }
 
 ############################## main code ###############################
 
 cycles="standard pkix upgradedb sharedb"
 CYCLES=${NSS_CYCLES:-$cycles}
 
-tests="cipher lowhash libpkix cert dbtests tools fips sdr crmf smime ssl ocsp merge pkits ec gtests ssl_gtests"
+if [ -n "$NSS_FORCE_FIPS" ]; then
+    RUN_FIPS="fips"
+    export NSS_TEST_ENABLE_FIPS=1
+fi
+
+tests="cipher lowhash libpkix cert dbtests tools $RUN_FIPS sdr crmf smime ssl ocsp merge pkits ec gtests ssl_gtests"
 # Don't run chains tests when we have a gyp build.
 if [ "$OBJDIR" != "Debug" -a "$OBJDIR" != "Release" ]; then
   tests="$tests chains"
 fi
 TESTS=${NSS_TESTS:-$tests}
 
 ALL_TESTS=${TESTS}