Forgot commit: support for special-cases in pgcrypto
authorMagnus Hagander <magnus@hagander.net>
Fri, 23 Mar 2007 10:05:34 +0000 (10:05 +0000)
committerMagnus Hagander <magnus@hagander.net>
Fri, 23 Mar 2007 10:05:34 +0000 (10:05 +0000)
src/tools/msvc/getregress.pl

index e9c1c583427de201649b45e83bcea140e4d6c9cb..b6ace3bbddc34704060ef03c09578df5b13b038c 100644 (file)
@@ -18,5 +18,29 @@ if ($m =~ /^REGRESS\s*=\s*(.*)$/gm)
 {
     my $t = $1;
     $t =~ s/\s+/ /g;
+
+    if ($m =~ /contrib\/pgcrypto/)
+    {
+
+        # pgcrypto is special since the tests depend on the configuration of the build
+        our $config;
+        require '../../src/tools/msvc/config.pl';
+
+        my $cftests = $config->{openssl}?GetTests("OSSL_TESTS",$m):GetTests("INT_TESTS",$m);
+        my $pgptests = $config->{zlib}?GetTests("ZLIB_TST",$m):GetTests("ZLIB_OFF_TST",$m);
+        $t =~ s/\$\(CF_TESTS\)/$cftests/;
+        $t =~ s/\$\(CF_PGP_TESTS\)/$pgptests/;
+    }
     print "SET TESTS=$t";
 }
+
+sub GetTests
+{
+    my $testname = shift;
+    my $m = shift;
+    if ($m =~ /^$testname\s*=\s*(.*)$/gm)
+    {
+        return $1;
+    }
+    return "";
+}