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

Commitf10589e

Browse files
committed
Make pg_regress clean out the testtablespace directory only on Windows.
On other platforms it's better to let the Makefile handle it, but we wantthe regression tests to be invokable without make on Windows. A batchfile would be a better solution, but no time for that before 8.3.Per my discovery that this breaks testing under SELinux, and subsequentdiscussion.
1 parentaeeef41 commitf10589e

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2008, 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.40 2008/01/01 19:46:00 momjian Exp $
14+
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.41 2008/01/19 17:43:42 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -102,10 +102,8 @@ static intsuccess_count = 0;
102102
staticintfail_count=0;
103103
staticintfail_ignore_count=0;
104104

105-
staticbool
106-
directory_exists(constchar*dir);
107-
staticvoid
108-
make_directory(constchar*dir);
105+
staticbooldirectory_exists(constchar*dir);
106+
staticvoidmake_directory(constchar*dir);
109107

110108
staticvoid
111109
header(constchar*fmt,...)
@@ -453,11 +451,23 @@ convert_sourcefiles_in(char *source, char *dest, char *suffix)
453451
*c='/';
454452
#endif
455453

456-
/* try to create the test tablespace dir if it doesn't exist */
457454
snprintf(testtablespace,MAXPGPATH,"%s/testtablespace",abs_builddir);
455+
456+
#ifdefWIN32
457+
/*
458+
* On Windows only, clean out the test tablespace dir, or create it if it
459+
* doesn't exist. On other platforms we expect the Makefile to take
460+
* care of that. (We don't migrate that functionality in here because
461+
* it'd be harder to cope with platform-specific issues such as SELinux.)
462+
*
463+
* XXX it would be better if pg_regress.c had nothing at all to do with
464+
* testtablespace, and this were handled by a .BAT file or similar on
465+
* Windows. See pgsql-hackers discussion of 2008-01-18.
466+
*/
458467
if (directory_exists(testtablespace))
459468
rmtree(testtablespace, true);
460469
make_directory(testtablespace);
470+
#endif
461471

462472
/* finally loop on each file and do the replacement */
463473
for (name=names;*name;name++)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp