Commits

Peter Eisentraut committed eb7b875

Detect plproxy test suite failures

This needs a version of the wpti wrapper that can set locale and
listen_addresses. Also call make installcheck with -k instead of -i so
that the failures are actually detected.

Comments (0)

Files changed (3)

jenkins/jobs/plproxy/config.xml

       <selector class="hudson.plugins.copyartifact.StatusBuildSelector"/>
     </hudson.plugins.copyartifact.CopyArtifact>
     <hudson.tasks.Shell>
-      <command>. /srv/pgci/jobhelpers/pgxs-build.sh</command>
+      <command>WPTI_FLAGS=-CL
+. /srv/pgci/jobhelpers/pgxs-build.sh</command>
     </hudson.tasks.Shell>
   </builders>
-  <publishers/>
+  <publishers>
+    <hudson.plugins.textfinder.TextFinderPublisher plugin="text-finder@1.9">
+      <regexp>5644dbce38ce0f5f16155eba9988fee1</regexp>
+      <succeedIfFound>false</succeedIfFound>
+      <unstableIfFound>true</unstableIfFound>
+      <alsoCheckConsoleOutput>true</alsoCheckConsoleOutput>
+    </hudson.plugins.textfinder.TextFinderPublisher>
+  </publishers>
   <buildWrappers>
     <hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.3.2"/>
   </buildWrappers>

jobhelpers/pgxs-build.sh

 
 	make -k all
 	make -k install
-	/srv/pgci/jobhelpers/wpti make -i installcheck || echo unstable | md5sum
+	/srv/pgci/jobhelpers/wpti $WPTI_FLAGS make -k installcheck || echo unstable | md5sum
 )
 done
 use warnings;
 
 use File::Temp qw/tempdir/;
+use Getopt::Std;
 
 
 my $tmpdir = tempdir(CLEANUP => 1);
 $ENV{PGDATA} = $tmpdir."/pgdata";
 $ENV{PGUSER} = 'postgres';
 
+my $listen_addresses = '';
+my $locale_opt = '';
+
+my %opts;
+getopts('CL', \%opts);
+$listen_addresses = 'localhost' if $opts{L};
+$locale_opt = '--locale=C' if $opts{C};
+
 my $ret;
 
-system 'initdb -A trust -U postgres >/dev/null';
-$ret = system 'pg_ctl', '-s', '-w', '-l', "$tmpdir/logfile", '-o', "--fsync=off -k $tmpdir --listen-addresses=''", 'start';
+system "initdb -A trust -U postgres $locale_opt >/dev/null";
+$ret = system 'pg_ctl', '-s', '-w', '-l', "$tmpdir/logfile", '-o', "--fsync=off -k $tmpdir --listen-addresses='$listen_addresses'", 'start';
 
 if ($ret != 0) {
     system('cat', "$tmpdir/logfile");
     exit 88;
 }
 
-$ret = system @ARGV;
+if (@ARGV) {
+    $ret = system @ARGV;
+} else {
+    $ret = system $ENV{SHELL};
+}
 
 system 'pg_ctl', '-s', '-w', '-m', 'immediate', 'stop';
 
 } elsif ($ret & 127) {
     exit 255;
 } else {
-    exit $ret >> 8;
+    exit($ret >> 8);
 }