Update cms-test.pl to handle some Unix like Windows environments where
authorDr. Stephen Henson <steve@openssl.org>
Thu, 20 May 2010 17:28:37 +0000 (17:28 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Thu, 20 May 2010 17:28:37 +0000 (17:28 +0000)
calling shlib_wrap.sh doesn't work.

test/cms-test.pl

index 6ad7883..e5122bf 100644 (file)
 # OpenSSL PKCS#7 and CMS implementations.
 
 my $ossl_path;
-
-if ( -f "../apps/openssl$ENV{EXE_EXT}" ) {
+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$ENV{EXE_EXT}" ) {
     $ossl_path = "../util/shlib_wrap.sh ../apps/openssl";
 }
 elsif ( -f "..\\out32dll\\openssl.exe" ) {
@@ -382,14 +385,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++;