[postgis-tickets] [SCM] PostGIS; Spatial objects for PostgreSQL. branch master updated. 27ebfe7b979c499ad36e8c94ed5b575d3e64349a

git at osgeo.org git at osgeo.org
Sun Nov 10 13:48:49 PST 2019


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; Spatial objects for PostgreSQL.".

The branch, master has been updated
       via  27ebfe7b979c499ad36e8c94ed5b575d3e64349a (commit)
      from  bb78dff81d8610dd3bd60efc1618b0109d129f0e (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 27ebfe7b979c499ad36e8c94ed5b575d3e64349a
Author: Darafei Praliaskouski <me at komzpa.net>
Date:   Sun Nov 10 18:39:39 2019 +0300

    Timer in test runs

diff --git a/regress/run_test.pl b/regress/run_test.pl
index 5bf3227..50e2032 100755
--- a/regress/run_test.pl
+++ b/regress/run_test.pl
@@ -15,6 +15,7 @@
 #$| = 1;
 use File::Basename;
 use File::Temp 'tempdir';
+use Time::HiRes qw(time);
 #use File::Which;
 use File::Copy;
 use File::Path;
@@ -456,6 +457,7 @@ foreach $TEST (@ARGV)
 {
 	my $TEST_OBJ_COUNT_PRE;
 	my $TEST_OBJ_COUNT_POST;
+	my $TEST_START_TIME;
 
 	# catch a common mistake (strip trailing .sql)
 	$TEST =~ s/.sql$//;
@@ -478,23 +480,24 @@ foreach $TEST (@ARGV)
 	# create the .sql
 	# Check for .dbf not just .shp since the loader can load
 	# .dbf files without a .shp.
+	$TEST_START_TIME = time;
 	if ( -r "${TEST}.dbf" )
 	{
-		pass() if ( run_loader_test() );
+		pass("in ".int(1000*(time-$TEST_START_TIME))." ms") if ( run_loader_test() );
 	}
 	elsif ( -r "${TEST}.tif" )
 	{
 		my $rv = run_raster_loader_test();
-		pass() if $rv;
+		pass("in ".int(1000*(time-$TEST_START_TIME))." ms") if $rv;
 	}
 	elsif ( -r "${TEST}.sql" )
 	{
 		my $rv = run_simple_test("${TEST}.sql", "${TEST}_expected");
-		pass() if $rv;
+		pass("in ".int(1000*(time-$TEST_START_TIME))." ms") if $rv;
 	}
 	elsif ( -r "${TEST}.dmp" )
 	{
-		pass() if run_dumper_test();
+		pass("in ".int(1000*(time-$TEST_START_TIME))." ms") if run_dumper_test();
 	}
 	else
 	{
@@ -630,8 +633,8 @@ sub show_progress
 # pass <msg>
 sub pass
 {
-  my $msg = shift;
-  printf(" ok %s\n", $msg);
+    my $msg = shift;
+    printf(" ok %s\n", $msg);
 }
 
 # fail <msg> <log>

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

Summary of changes:
 regress/run_test.pl | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
PostGIS; Spatial objects for PostgreSQL.


More information about the postgis-tickets mailing list