Make sure the source directory for ASN1TEST is defined.
[openssl.git] / test / cms-test.pl
index ea7c2bd847b6f6479e9787570991d0de55d33a71..9c50dff3e9a3c3291ed91857da7ec26bba7b2d59 100644 (file)
 # OpenSSL PKCS#7 and CMS implementations.
 
 my $ossl_path;
-
-if ( -f "../apps/openssl" ) {
-    $ossl_path = "../util/shlib_wrap.sh ../apps/openssl";
+my $redir = " 2>cms.err 1>cms.out";
+# Make MSYS work
+if ( $^O eq "MSWin32" && -f "../apps/openssl.exe" ) {
+    $ossl_path = "cmd /c ..\\apps\\openssl";
 }
-elsif ( -f "../apps/openssl.exe" ) {
-    $ossl_path = "../util/shlib_wrap.sh ../apps/openssl.exe";
+elsif ( -f "../apps/openssl$ENV{EXE_EXT}" ) {
+    $ossl_path = "../util/shlib_wrap.sh ../apps/openssl";
 }
 elsif ( -f "..\\out32dll\\openssl.exe" ) {
     $ossl_path = "..\\out32dll\\openssl.exe";
@@ -385,14 +386,14 @@ sub run_smime_tests {
                $rscmd =~ s/-stream//;  
                $rvcmd =~ s/-stream//;
                }
-        system("$scmd$rscmd 2>cms.err 1>cms.out");
+        system("$scmd$rscmd$redir");
         if ($?) {
             print "$tnam: generation error\n";
             $$rv++;
             exit 1 if $halt_err;
             next;
         }
-        system("$vcmd$rvcmd 2>cms.err 1>cms.out");
+        system("$vcmd$rvcmd$redir");
         if ($?) {
             print "$tnam: verify error\n";
             $$rv++;