Fix regression framework so that "make check" runs
authorPavan Deolasee <[email protected]>
Tue, 18 Oct 2016 11:37:50 +0000 (17:07 +0530)
committerPavan Deolasee <[email protected]>
Tue, 18 Oct 2016 11:37:50 +0000 (17:07 +0530)
src/test/regress/pg_regress.c

index 91140843106a55e664352dd058005ba64f5d5835..ec1871770ce5af035e4169c09415386ddf3139bd 100644 (file)
@@ -3038,7 +3038,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
                make_directory(temp_instance);
 
                /* and a directory for log files */
-               snprintf(buf, sizeof(buf), "%s/log", temp_instance);
+               snprintf(buf, sizeof(buf), "%s/log", outputdir);
                if (!directory_exists(buf))
                        make_directory(buf);
 
@@ -3059,7 +3059,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
                                 temp_instance,
                                 debug ? " --debug" : "",
                                 nolocale ? " --no-locale" : "",
-                                temp_instance);
+                                outputdir);
                if (system(buf))
                {
                        fprintf(stderr, _("\n%s: initdb failed\nExamine %s/log/initdb.log for the reason.\nCommand was: %s\n"), progname, outputdir, buf);
@@ -3195,7 +3195,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
                                 bindir ? "/" : "",
                                 temp_instance, debug ? " -d 5" : "",
                                 hostname ? hostname : "", sockdir ? sockdir : "",
-                                temp_instance);
+                                outputdir);
                postmaster_pid = spawn_process(buf);
                if (postmaster_pid == INVALID_PID)
                {