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

Commited79edd

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 parentb6948e1 commited79edd

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
@@ -418,7 +418,7 @@ replace_string(char *string, char *replace, char *replacement)
418418
* the given suffix.
419419
*/
420420
staticvoid
421-
convert_sourcefiles_in(char*source_subdir,char*dest_subdir,char*suffix)
421+
convert_sourcefiles_in(char*source_subdir,char*dest_dir,char*dest_subdir,char*suffix)
422422
{
423423
chartesttablespace[MAXPGPATH];
424424
charindir[MAXPGPATH];
@@ -486,7 +486,8 @@ convert_sourcefiles_in(char *source_subdir, char *dest_subdir, char *suffix)
486486
/* build the full actual paths to open */
487487
snprintf(prefix,strlen(*name)-6,"%s",*name);
488488
snprintf(srcfile,MAXPGPATH,"%s/%s",indir,*name);
489-
snprintf(destfile,MAXPGPATH,"%s/%s.%s",dest_subdir,prefix,suffix);
489+
snprintf(destfile,MAXPGPATH,"%s/%s/%s.%s",dest_dir,dest_subdir,
490+
prefix,suffix);
490491

491492
infile=fopen(srcfile,"r");
492493
if (!infile)
@@ -533,8 +534,8 @@ convert_sourcefiles_in(char *source_subdir, char *dest_subdir, char *suffix)
533534
staticvoid
534535
convert_sourcefiles(void)
535536
{
536-
convert_sourcefiles_in("input","sql","sql");
537-
convert_sourcefiles_in("output","expected","out");
537+
convert_sourcefiles_in("input",inputdir,"sql","sql");
538+
convert_sourcefiles_in("output",outputdir,"expected","out");
538539
}
539540

540541
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp