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

Commitc0998cf

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 parent5d49250 commitc0998cf

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
@@ -413,7 +413,7 @@ replace_string(char *string, char *replace, char *replacement)
413413
* the given suffix.
414414
*/
415415
staticvoid
416-
convert_sourcefiles_in(char*source_subdir,char*dest_subdir,char*suffix)
416+
convert_sourcefiles_in(char*source_subdir,char*dest_dir,char*dest_subdir,char*suffix)
417417
{
418418
chartesttablespace[MAXPGPATH];
419419
charindir[MAXPGPATH];
@@ -481,7 +481,8 @@ convert_sourcefiles_in(char *source_subdir, char *dest_subdir, char *suffix)
481481
/* build the full actual paths to open */
482482
snprintf(prefix,strlen(*name)-6,"%s",*name);
483483
snprintf(srcfile,MAXPGPATH,"%s/%s",indir,*name);
484-
snprintf(destfile,MAXPGPATH,"%s/%s.%s",dest_subdir,prefix,suffix);
484+
snprintf(destfile,MAXPGPATH,"%s/%s/%s.%s",dest_dir,dest_subdir,
485+
prefix,suffix);
485486

486487
infile=fopen(srcfile,"r");
487488
if (!infile)
@@ -528,8 +529,8 @@ convert_sourcefiles_in(char *source_subdir, char *dest_subdir, char *suffix)
528529
staticvoid
529530
convert_sourcefiles(void)
530531
{
531-
convert_sourcefiles_in("input","sql","sql");
532-
convert_sourcefiles_in("output","expected","out");
532+
convert_sourcefiles_in("input",inputdir,"sql","sql");
533+
convert_sourcefiles_in("output",outputdir,"expected","out");
533534
}
534535

535536
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp