OSDN Git Service

Fix some portability issues in isolation regression test driver.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 8 May 2011 23:44:12 +0000 (19:44 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 8 May 2011 23:45:00 +0000 (19:45 -0400)
Remove random system #includes in favor of using postgres_fe.h.  (The
alternative to that is letting this module grow its own configuration
testing ability...)

Also fix the "make clean" target to actually clean things up.

Per local testing.

src/test/isolation/Makefile
src/test/isolation/isolation_main.c
src/test/isolation/isolationtester.c
src/test/isolation/specparse.y

index 0f709a1..c027c29 100644 (file)
@@ -10,7 +10,7 @@ ifeq ($(PORTNAME), win32)
 LDLIBS += -lws2_32
 endif
 
-override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) $(CPPFLAGS)
+override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) -I$(srcdir)/../regress $(CPPFLAGS)
 override LDLIBS := $(libpq_pgport) $(LDLIBS)
 
 OBJS =  specparse.o isolationtester.o
@@ -64,7 +64,7 @@ endif
 clean distclean:
        rm -f isolationtester$(X) pg_isolation_regress$(X) $(OBJS) isolation_main.o
        rm -f pg_regress.o
-       rm -rf results
+       rm -rf $(pg_regress_clean_files)
 
 maintainer-clean: distclean
        rm -f specparse.c specscanner.c
index 2df12f8..18cd8ef 100644 (file)
@@ -10,7 +10,7 @@
  *-------------------------------------------------------------------------
  */
 
-#include "../regress/pg_regress.h"
+#include "pg_regress.h"
 
 /*
  * start an isolation tester process for specified file (including
index 44a4858..0f77917 100644 (file)
@@ -5,14 +5,12 @@
  *             Runs an isolation test specified by a spec file.
  */
 
+#include "postgres_fe.h"
+
 #ifdef WIN32
 #include <windows.h>
 #endif
 
-#include <stddef.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 #include "libpq-fe.h"
 
 #include "isolationtester.h"
index c684780..47bfbc4 100644 (file)
  *-------------------------------------------------------------------------
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <string.h>
+#include "postgres_fe.h"
 
 #include "isolationtester.h"