Merge pull request #3425 from citusdata/make-test-copying-work-again

Replace denormalized test output with normalized at the end of the run
pull/3428/head^2
Philip Dubé 2020-01-24 17:42:54 +00:00 committed by GitHub
commit ca85b2b4ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 11 deletions

View File

@ -0,0 +1,15 @@
#!/bin/bash
set -euo pipefail
# This is to make the following command work to update the test output:
# cp src/test/regress/{results,expected}/multi_cluster_management.out
#
# This can not be done in the custom "diff" command, because that is executed
# multiple times
for modified_file in {results,expected}/*.modified; do
original=${modified_file%.modified}
mv "$original" "$original.unmodified"
mv "$modified_file" "$original"
done

View File

@ -783,6 +783,8 @@ push(@arguments, @ARGV);
my $startTime = time();
my $exitcode = 0;
# Finally run the tests
if ($vanillatest)
{
@ -797,30 +799,33 @@ if ($vanillatest)
mkdir "./testtablespace";
my $pgregressdir=catfile(dirname("$pgxsdir"), "regress");
system("$plainRegress", ("--inputdir", $pgregressdir),
("--schedule", catfile("$pgregressdir", "parallel_schedule"))) == 0
or die "Could not run vanilla tests";
$exitcode = system("$plainRegress", ("--inputdir", $pgregressdir),
("--schedule", catfile("$pgregressdir", "parallel_schedule")))
}
else
{
system("make", ("-C", catfile("$postgresBuilddir", "src", "test", "regress"), "installcheck-parallel")) == 0
or die "Could not run vanilla tests";
$exitcode = system("make", ("-C", catfile("$postgresBuilddir", "src", "test", "regress"), "installcheck-parallel"))
}
}
elsif ($isolationtester)
{
push(@arguments, "--dbname=regression");
system("$isolationRegress", @arguments) == 0
or die "Could not run isolation tests";
$exitcode = system("$isolationRegress", @arguments)
}
else
{
system("$plainRegress", @arguments) == 0
or die "Could not run regression tests";
$exitcode = system("$plainRegress", @arguments);
}
system (catfile("bin", "copy_modified"));
my $endTime = time();
print "Finished in ". ($endTime - $startTime)." seconds. \n";
if ($exitcode == 0) {
print "Finished in ". ($endTime - $startTime)." seconds. \n";
exit 0;
}
else {
die "Failed in ". ($endTime - $startTime)." seconds. \n";
}
exit 0;