Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 67a4c24

Browse files
committed
Fix pg_regress breakage for PL and contrib tests, by not requiring that
"input" and "output" dirs be necessarily present.
1 parent 506b292 commit 67a4c24

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/test/regress/pg_regress.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.26 2007/01/19 16:42:24 alvherre Exp $
14+
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.27 2007/01/19 21:21:13 alvherre Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -478,11 +478,20 @@ convert_sourcefiles_in(char *source, char *dest, char *suffix)
478478
pgfnames_cleanup(names);
479479
}
480480

481+
/* Create the .sql and .out files from the .source files, if any */
481482
static void
482483
convert_sourcefiles(void)
483484
{
484-
convert_sourcefiles_in("input", "sql", "sql");
485-
convert_sourcefiles_in("output", "expected", "out");
485+
struct stat st;
486+
int ret;
487+
488+
ret = stat("input", &st);
489+
if (ret == 0 && S_ISDIR(st.st_mode))
490+
convert_sourcefiles_in("input", "sql", "sql");
491+
492+
ret = stat("output", &st);
493+
if (ret == 0 && S_ISDIR(st.st_mode))
494+
convert_sourcefiles_in("output", "expected", "out");
486495
}
487496

488497
/*

0 commit comments

Comments
 (0)