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

Commite3fc4a9

Browse files
committed
Honor inputdir and outputdir when converting regression files.
When converting source files, pg_regress' inputdir and outputdir options wereignored when computing the locations of the destination files. In consequence,these options were effectively unusable when the regression inputs need tobe adjusted by pg_regress. This patch makes pg_regress put the converted filesin the same place that these options specify non-converted input or resultsfiles are to be found. Backpatched to all live branches.
1 parentced53c3 commite3fc4a9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ replace_string(char *string, char *replace, char *replacement)
407407
* the given suffix.
408408
*/
409409
staticvoid
410-
convert_sourcefiles_in(char*source_subdir,char*dest_subdir,char*suffix)
410+
convert_sourcefiles_in(char*source_subdir,char*dest_dir,char*dest_subdir,char*suffix)
411411
{
412412
chartesttablespace[MAXPGPATH];
413413
charindir[MAXPGPATH];
@@ -475,7 +475,8 @@ convert_sourcefiles_in(char *source_subdir, char *dest_subdir, char *suffix)
475475
/* build the full actual paths to open */
476476
snprintf(prefix,strlen(*name)-6,"%s",*name);
477477
snprintf(srcfile,MAXPGPATH,"%s/%s",indir,*name);
478-
snprintf(destfile,MAXPGPATH,"%s/%s.%s",dest_subdir,prefix,suffix);
478+
snprintf(destfile,MAXPGPATH,"%s/%s/%s.%s",dest_dir,dest_subdir,
479+
prefix,suffix);
479480

480481
infile=fopen(srcfile,"r");
481482
if (!infile)
@@ -522,8 +523,8 @@ convert_sourcefiles_in(char *source_subdir, char *dest_subdir, char *suffix)
522523
staticvoid
523524
convert_sourcefiles(void)
524525
{
525-
convert_sourcefiles_in("input","sql","sql");
526-
convert_sourcefiles_in("output","expected","out");
526+
convert_sourcefiles_in("input",inputdir,"sql","sql");
527+
convert_sourcefiles_in("output",outputdir,"expected","out");
527528
}
528529

529530
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp