Run recently backported plperlu_plperl regression tests when building with MSVC on...
authorAndrew Dunstan <[email protected]>
Wed, 2 Jun 2010 15:58:08 +0000 (15:58 +0000)
committerAndrew Dunstan <[email protected]>
Wed, 2 Jun 2010 15:58:08 +0000 (15:58 +0000)
src/tools/msvc/vcregress.pl

index 6191855cffac44633ea79748e6eb3f3275b2d62c..82050a8eb9353df65d3dedffb7866944def0fc5f 100644 (file)
@@ -1,7 +1,7 @@
 
 # -*-perl-*- hey - emacs - this is a perl file
 
-# $PostgreSQL: pgsql/src/tools/msvc/vcregress.pl,v 1.6.2.1 2010/03/02 18:15:53 adunstan Exp $
+# $PostgreSQL: pgsql/src/tools/msvc/vcregress.pl,v 1.6.2.2 2010/06/02 15:58:08 adunstan Exp $
 
 use strict;
 
@@ -166,14 +166,29 @@ sub plcheck
         my $lang = $pl eq 'tcl' ? 'pltcl' : $pl;
         next unless -d "../../$Config/$lang";
         $lang = 'plpythonu' if $lang eq 'plpython';
+       my @lang_args = ( "--load-language=$lang" );
         chdir $pl;
+        my @tests = fetchTests();
+       if ($lang eq 'plperl')
+       {
+           # run both trusted and untrusted perl tests
+           push (@lang_args, "--load-language=plperlu");
+
+           # assume we're using this perl to built postgres
+           # test if we can run two interpreters in one backend, and if so
+           # run the trusted/untrusted interaction tests
+           use Config;
+           if ($Config{usemultiplicity} eq 'define')
+           {
+               push(@tests,'plperl_plperlu');
+           }
+       }
        print "============================================================\n";
         print "Checking $lang\n";
-        my @tests = fetchTests();
         my @args = (
             "../../../$Config/pg_regress/pg_regress",
             "--psqldir=../../../$Config/psql",
-            "--dbname=pl_regression","--load-language=$lang",@tests
+            "--dbname=pl_regression",@lang_args,@tests
         );
         system(@args);
         my $status = $? >> 8;