[PATCH] correct the initdb.log path for pg_regress

Started by David Christensenover 10 years ago2 messages
#1David Christensen
david@endpoint.com
1 attachment(s)

When encountering an initdb failure in pg_regress, we were displaying the incorrect path to the log file; this commit fixes all 3 places this could occur.

Attachments:

0001-Output-the-correct-path-for-initdb.log-in-pg_regress.patchapplication/octet-stream; name=0001-Output-the-correct-path-for-initdb.log-in-pg_regress.patchDownload
>From bb40f0a3a4c8b25f960d9f6f3ba695a754c48ec3 Mon Sep 17 00:00:00 2001
From: David Christensen <david@endpoint.com>
Date: Tue, 7 Jul 2015 10:20:44 -0500
Subject: [PATCH] Output the correct path for initdb.log in pg_regress

---
 src/test/regress/pg_regress.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index a267894..ed8c369 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -2223,7 +2223,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
 				 temp_instance);
 		if (system(buf))
 		{
-			fprintf(stderr, _("\n%s: initdb failed\nExamine %s/log/initdb.log for the reason.\nCommand was: %s\n"), progname, outputdir, buf);
+			fprintf(stderr, _("\n%s: initdb failed\nExamine %s/log/initdb.log for the reason.\nCommand was: %s\n"), progname, temp_instance, buf);
 			exit(2);
 		}
 
@@ -2353,7 +2353,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
 			if (WaitForSingleObject(postmaster_pid, 0) == WAIT_OBJECT_0)
 #endif
 			{
-				fprintf(stderr, _("\n%s: postmaster failed\nExamine %s/log/postmaster.log for the reason\n"), progname, outputdir);
+				fprintf(stderr, _("\n%s: postmaster failed\nExamine %s/log/postmaster.log for the reason\n"), progname, temp_instance);
 				exit(2);
 			}
 
@@ -2361,7 +2361,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
 		}
 		if (i >= 60)
 		{
-			fprintf(stderr, _("\n%s: postmaster did not respond within 60 seconds\nExamine %s/log/postmaster.log for the reason\n"), progname, outputdir);
+			fprintf(stderr, _("\n%s: postmaster did not respond within 60 seconds\nExamine %s/log/postmaster.log for the reason\n"), progname, temp_instance);
 
 			/*
 			 * If we get here, the postmaster is probably wedged somewhere in
-- 
2.3.5

#2Fujii Masao
masao.fujii@gmail.com
In reply to: David Christensen (#1)
Re: [PATCH] correct the initdb.log path for pg_regress

On Wed, Jul 8, 2015 at 12:23 AM, David Christensen <david@endpoint.com> wrote:

When encountering an initdb failure in pg_regress, we were displaying the incorrect path to the log file; this commit fixes all 3 places this could occur.

Pushed. Thanks!

Regards,

--
Fujii Masao

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers