diff options
Diffstat (limited to 'security/nss/tests/cert')
-rwxr-xr-x | security/nss/tests/cert/cert.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/security/nss/tests/cert/cert.sh b/security/nss/tests/cert/cert.sh index d7ec101fa7..67951f6e43 100755 --- a/security/nss/tests/cert/cert.sh +++ b/security/nss/tests/cert/cert.sh @@ -2607,8 +2607,40 @@ cert_cleanup() . common/cleanup.sh } +CERTCACHE=${TESTDIR}/${HOST}.${TEST_MODE}.cert.cache.tar.gz + +cert_make_cache() +{ + if [ -n "${NSS_USE_CERT_CACHE}" ] ; then + pushd ${HOSTDIR} + tar czf "${CERTCACHE}" . + popd + fi +} + +cert_use_cache() +{ + if [ -n "${NSS_USE_CERT_CACHE}" ] ; then + pushd ${HOSTDIR} + if [ -r "${CERTCACHE}" ]; then + tar xzf "${CERTCACHE}" + return 1; + fi + popd + fi + + rm "${CERTCACHE}" + return 0; +} + ################## main ################################################# +cert_use_cache +USING_CACHE=$? +if [[ $USING_CACHE -eq 1 ]]; then + return 0; +fi + cert_init cert_all_CA cert_test_implicit_db_init @@ -2648,3 +2680,4 @@ fi cert_iopr_setup cert_cleanup +cert_make_cache |