]> www.wagner.pp.ru Git - openssl-gost/engine.git/blobdiff - tcl_tests/runtest.sh
tcl_tests: Fix smimeenc test by removing entries with empty params
[openssl-gost/engine.git] / tcl_tests / runtest.sh
index 11fdedad284b14a88fdb233b41dd4de68308da0d..0589f78d29818998103602cda96db3c7a69202a0 100644 (file)
@@ -23,6 +23,7 @@
 
 CRYPTOPACK_MAIN_VERSION=3
 
+: ${OPENSSL_APP:=$(which openssl 2>/dev/null)}
 if [ -z "$OPENSSL_APP" ]; then
        if [ "$OS" != "Windows NT" -a "$OS" != "Windows_NT" ]; then
                if [ -x  /opt/cryptopack$CRYPTOPACK_MAIN_VERSION/bin/openssl ]; then
@@ -43,7 +44,7 @@ else
        echo "Using $OPENSSL_APP as openssl"
 fi
 
-
+: ${TCLSH:=$(which tclsh)}
 if [ -z "$TCLSH" ]; then
        for version in "" 8.4 84 8.5 85 8.6 86; do
                for command in tclsh$version; do
@@ -86,6 +87,7 @@ case "$ENGINE_NAME" in
                OTHER_DIR=`echo $TESTDIR |sed 's/cryptocom/gost/'`
                ;;
        gost)
+               BASE_TESTS="engine dgst mac pkcs8 enc req-genpkey req-newkey ca smime smime2 smimeenc cms cms2 cmsenc pkcs12 nopath ocsp ts ssl smime_io cms_io smimeenc_io cmsenc_io"
                OTHER_DIR=`echo $TESTDIR |sed 's/gost/cryptocom/'`
                ;;
        *)
@@ -103,12 +105,20 @@ OPENSSL_DEBUG_MEMORY=on
 export OPENSSL_DEBUG_MEMORY
 
 fail=0
+if [ "$*" ]; then
+  for t do
+    $TCLSH $t.try || fail=1
+  done
+  exit $fail
+fi
 for t in $BASE_TESTS; do
        $TCLSH $t.try || fail=1
 done
 
-ALG_LIST="rsa:1024 gost2001:XA gost2012_256:XA gost2012_512:A" OPENSSL_CONF=`pwd`/openssl-gost.cnf $TCLSH ssl.try -clientconf `pwd`/openssl-cryptocom.cnf || fail=1
-ALG_LIST="rsa:1024 gost2001:XA gost2012_256:XA gost2012_512:A" OPENSSL_CONF=`pwd`/openssl-gost.cnf $TCLSH ssl.try -serverconf `pwd`/openssl-cryptocom.cnf || fail=1
+if false; then # ignore some tests for a time
+: ${OPENSSL_CONF:=$PWD/openssl-gost.cnf}
+ALG_LIST="rsa:1024 gost2001:XA gost2012_256:XA gost2012_512:A" $TCLSH ssl.try -clientconf $OPENSSL_CONF || fail=1
+ALG_LIST="rsa:1024 gost2001:XA gost2012_256:XA gost2012_512:A" $TCLSH ssl.try -serverconf $OPENSSL_CONF || fail=1
        
 for t in $PKCS7_COMPATIBILITY_TESTS; do
        $TCLSH $t.try || fail=1
@@ -146,6 +156,7 @@ if [ -d OtherVersion ] ; then
                        exit 1;
        esac
 fi     
+fi # false
 $TCLSH calcstat ${TESTDIR}/stats ${TESTDIR}/test.result
 grep "leaked" ${TESTDIR}/*.log
 if [ $fail  -ne 0 ]; then