[postgis-tickets] [SCM] PostGIS branch master updated. 3.3.0rc2-602-g12befaaa4

git at osgeo.org git at osgeo.org
Mon Feb 13 09:32:31 PST 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  12befaaa4befd6ce57dadb9dbf8797e4b9fbde65 (commit)
      from  b1b8c11bfe54d7756ed53719e74783dd2733d3df (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 12befaaa4befd6ce57dadb9dbf8797e4b9fbde65
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri Feb 10 11:02:12 2023 +0100

    Add before and after test hooks in run_test.pl

diff --git a/regress/run_test.pl b/regress/run_test.pl
index 06667de1a..c78e76631 100755
--- a/regress/run_test.pl
+++ b/regress/run_test.pl
@@ -77,6 +77,8 @@ my $OPT_WITH_SFCGAL = 0;
 my $OPT_EXPECT = 0;
 my $OPT_EXTENSIONS = 0;
 my @OPT_HOOK_AFTER_CREATE;
+my @OPT_HOOK_BEFORE_TEST;
+my @OPT_HOOK_AFTER_TEST;
 my @OPT_HOOK_BEFORE_UNINSTALL;
 my @OPT_HOOK_BEFORE_UPGRADE;
 my @OPT_HOOK_AFTER_UPGRADE;
@@ -104,7 +106,9 @@ GetOptions (
 	'schema=s' => \$OPT_SCHEMA,
 	'build-dir=s' => \$TOP_BUILDDIR,
 	'after-create-script=s' => \@OPT_HOOK_AFTER_CREATE,
+	'after-test-script=s' => \@OPT_HOOK_AFTER_TEST,
 	'before-uninstall-script=s' => \@OPT_HOOK_BEFORE_UNINSTALL,
+	'before-test-script=s' => \@OPT_HOOK_BEFORE_TEST,
 	'before-upgrade-script=s' => \@OPT_HOOK_BEFORE_UPGRADE,
 	'after-upgrade-script=s' => \@OPT_HOOK_AFTER_UPGRADE
 	);
@@ -461,6 +465,12 @@ foreach $TEST (@ARGV)
 	# catch a common mistake (strip trailing .sql)
 	$TEST =~ s/.sql$//;
 
+	foreach my $hook (@OPT_HOOK_BEFORE_TEST)
+	{
+		print "  Running before-test-script $hook\n" if $VERBOSE > 1;
+		die unless load_sql_file($hook, 1);
+	}
+
 	start_test($TEST);
 	$TEST_OBJ_COUNT_PRE = count_postgis_objects();
 
@@ -543,6 +553,12 @@ foreach $TEST (@ARGV)
 		fail("PostGIS object count pre-test ($TEST_OBJ_COUNT_POST) != post-test ($TEST_OBJ_COUNT_PRE)");
 	}
 
+	foreach my $hook (@OPT_HOOK_AFTER_TEST)
+	{
+		print "  Running after-test-script $hook\n" if $VERBOSE > 1;
+		die unless load_sql_file($hook, 1);
+	}
+
 }
 
 foreach my $hook (@OPT_HOOK_BEFORE_UNINSTALL)
@@ -642,6 +658,12 @@ Options:
   --after-upgrade-script <path>
                   script to load after upgrade
                   (multiple switches supported, to be run in given order)
+  --before-test-script <path>
+                  script to load before each test run
+                  (multiple switches supported, to be run in given order)
+  --after-test-script <path>
+                  script to load after each test run
+                  (multiple switches supported, to be run in given order)
 };
 
 }

-----------------------------------------------------------------------

Summary of changes:
 regress/run_test.pl | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list