Don't use TPREFIX shell variable for minimal script.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 14 Oct 2011 15:15:20 +0000 (15:15 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 14 Oct 2011 15:15:20 +0000 (15:15 +0000)
fips/fipsalgtest.pl

index 28dd315109b7f996e8cb639a7fee521fbe1c0eb1..2f6c45f9edfe1aaab75a560a93a649eb4827642d 100644 (file)
@@ -938,6 +938,7 @@ sub run_tests {
     my ( $tname, $tref );
     my $bad = 0;
     my $lastdir = "";
     my ( $tname, $tref );
     my $bad = 0;
     my $lastdir = "";
+    $stprefix = $tprefix unless defined $stprefix;
     if ($outfile ne "") {
        open OUT, ">$outfile" || die "Can't open $outfile";
     }
     if ($outfile ne "") {
        open OUT, ">$outfile" || die "Can't open $outfile";
     }
@@ -953,7 +954,6 @@ echo Running Algorithm Tests
 
 END
        } else {
 
 END
        } else {
-       $stprefix = $tprefix unless defined $stprefix;
            print OUT <<END;
 #!/bin/sh
 
            print OUT <<END;
 #!/bin/sh
 
@@ -1041,8 +1041,12 @@ END
         my $cmd = "$tcmd \"$req\" \"$out\"";
         print STDERR "DEBUG: running test $tname\n" if ( $debug && !$verify );
        if ($outfile ne "") {
         my $cmd = "$tcmd \"$req\" \"$out\"";
         print STDERR "DEBUG: running test $tname\n" if ( $debug && !$verify );
        if ($outfile ne "") {
-           print OUT "echo \"    running $tname test\"\n" unless $minimal_script;
-           print OUT "\${TPREFIX}$cmd\n";
+           if ($minimal_script) {
+               print OUT "$stprefix$cmd\n";
+           } else {
+               print OUT "echo \"    running $tname test\"\n" unless $minimal_script;
+               print OUT "\${TPREFIX}$cmd\n";
+           }
         } else {
             $cmd = "$tprefix$cmd";
             system($cmd);
         } else {
             $cmd = "$tprefix$cmd";
             system($cmd);