Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1995552

Browse files
committed
pg_regress: Don't use absolute paths for the diff
Don't expand inputfile and outputfile to absolute paths globally, justwhere needed. In particular, pass them as is to the file namearguments of the diff command, so that we don't see the full absolutepath in the diff header, which makes the diff unnecessarily verboseand harder to read.Discussion:https://www.postgresql.org/message-id/0cc82900-c457-1cee-3ab2-7b0f5d215061@2ndquadrant.com
1 parent1bb5e78 commit1995552

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ convert_sourcefiles_in(const char *source_subdir, const char *dest_dir, const ch
489489
/* Error logged in pgfnames */
490490
exit(2);
491491

492-
snprintf(testtablespace,MAXPGPATH,"%s/testtablespace",outputdir);
492+
snprintf(testtablespace,MAXPGPATH,"%s/testtablespace",make_absolute_path(outputdir));
493493

494494
#ifdefWIN32
495495

@@ -553,10 +553,10 @@ convert_sourcefiles_in(const char *source_subdir, const char *dest_dir, const ch
553553
}
554554
while (fgets(line,sizeof(line),infile))
555555
{
556-
replace_string(line,"@abs_srcdir@",inputdir);
557-
replace_string(line,"@abs_builddir@",outputdir);
556+
replace_string(line,"@abs_srcdir@",make_absolute_path(inputdir));
557+
replace_string(line,"@abs_builddir@",make_absolute_path(outputdir));
558558
replace_string(line,"@testtablespace@",testtablespace);
559-
replace_string(line,"@libdir@",dlpath);
559+
replace_string(line,"@libdir@",make_absolute_path(dlpath));
560560
replace_string(line,"@DLSUFFIX@",DLSUFFIX);
561561
fputs(line,outfile);
562562
}
@@ -2239,10 +2239,6 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
22392239
*/
22402240
port=0xC000 | (PG_VERSION_NUM&0x3FFF);
22412241

2242-
inputdir=make_absolute_path(inputdir);
2243-
outputdir=make_absolute_path(outputdir);
2244-
dlpath=make_absolute_path(dlpath);
2245-
22462242
/*
22472243
* Initialization
22482244
*/
@@ -2588,7 +2584,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
25882584
printf(_("The differences that caused some tests to fail can be viewed in the\n"
25892585
"file \"%s\". A copy of the test summary that you see\n"
25902586
"above is saved in the file \"%s\".\n\n"),
2591-
difffilename,logfilename);
2587+
make_absolute_path(difffilename),make_absolute_path(logfilename));
25922588
}
25932589
else
25942590
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp