mirror of
https://github.com/postgres/postgres.git
synced 2025-07-30 11:03:19 +03:00
Copy refint.so and autoinc.so into the src/test/regress directory during
"make all", and then reference them there during the actual tests. This makes the handling of these files more parallel to that of regress.so, and in particular simplifies use of the regression tests outside the original build tree. The PGDG and Red Hat RPMs have been doing this via patches for a very long time. Inclusion of the change in core was requested by Jørgen Austvik of Sun, and I can't see any reason not to. I attempted to fix the MSVC scripts for this too, but they may need further tweaking ...
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/regress.sgml,v 1.58 2007/06/12 17:49:12 mha Exp $ -->
|
<!-- $PostgreSQL: pgsql/doc/src/sgml/regress.sgml,v 1.59 2008/05/30 00:04:32 tgl Exp $ -->
|
||||||
|
|
||||||
<chapter id="regress">
|
<chapter id="regress">
|
||||||
<title id="regress-title">Regression Tests</title>
|
<title id="regress-title">Regression Tests</title>
|
||||||
@ -48,9 +48,9 @@ gmake check
|
|||||||
script. At the end you should see something like
|
script. At the end you should see something like
|
||||||
<screen>
|
<screen>
|
||||||
<computeroutput>
|
<computeroutput>
|
||||||
======================
|
=======================
|
||||||
All 100 tests passed.
|
All 115 tests passed.
|
||||||
======================
|
=======================
|
||||||
</computeroutput>
|
</computeroutput>
|
||||||
</screen>
|
</screen>
|
||||||
or otherwise a note about which tests failed. See <xref
|
or otherwise a note about which tests failed. See <xref
|
||||||
@ -67,7 +67,6 @@ gmake check
|
|||||||
For example
|
For example
|
||||||
<screen>
|
<screen>
|
||||||
<prompt>root# </prompt><userinput>chmod -R a+w src/test/regress</userinput>
|
<prompt>root# </prompt><userinput>chmod -R a+w src/test/regress</userinput>
|
||||||
<prompt>root# </prompt><userinput>chmod -R a+w contrib/spi</userinput>
|
|
||||||
<prompt>root# </prompt><userinput>su - joeuser</userinput>
|
<prompt>root# </prompt><userinput>su - joeuser</userinput>
|
||||||
<prompt>joeuser$ </prompt><userinput>cd <replaceable>top-level build directory</></userinput>
|
<prompt>joeuser$ </prompt><userinput>cd <replaceable>top-level build directory</></userinput>
|
||||||
<prompt>joeuser$ </prompt><userinput>gmake check</userinput>
|
<prompt>joeuser$ </prompt><userinput>gmake check</userinput>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
# Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
|
||||||
# Portions Copyright (c) 1994, Regents of the University of California
|
# Portions Copyright (c) 1994, Regents of the University of California
|
||||||
#
|
#
|
||||||
# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.73 2008/04/07 14:15:58 petere Exp $
|
# $PostgreSQL: pgsql/src/test/regress/GNUmakefile,v 1.74 2008/05/30 00:04:32 tgl Exp $
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -14,8 +14,6 @@ subdir = src/test/regress
|
|||||||
top_builddir = ../../..
|
top_builddir = ../../..
|
||||||
include $(top_builddir)/src/Makefile.global
|
include $(top_builddir)/src/Makefile.global
|
||||||
|
|
||||||
contribdir = $(top_builddir)/contrib
|
|
||||||
|
|
||||||
# port number for temp-installation test postmaster
|
# port number for temp-installation test postmaster
|
||||||
TEMP_PORT = 5$(DEF_PGPORT)
|
TEMP_PORT = 5$(DEF_PGPORT)
|
||||||
|
|
||||||
@ -115,20 +113,33 @@ $(remaining_files_build): $(abs_builddir)/%: $(srcdir)/%
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
# And finally some extra C modules...
|
# Get some extra C modules from contrib/spi...
|
||||||
|
|
||||||
all: all-spi tablespace-setup
|
all: refint$(DLSUFFIX) autoinc$(DLSUFFIX)
|
||||||
|
|
||||||
|
refint$(DLSUFFIX): $(top_builddir)/contrib/spi/refint$(DLSUFFIX)
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
|
autoinc$(DLSUFFIX): $(top_builddir)/contrib/spi/autoinc$(DLSUFFIX)
|
||||||
|
cp $< $@
|
||||||
|
|
||||||
|
$(top_builddir)/contrib/spi/refint$(DLSUFFIX): $(top_srcdir)/contrib/spi/refint.c
|
||||||
|
$(MAKE) -C $(top_builddir)/contrib/spi refint$(DLSUFFIX)
|
||||||
|
|
||||||
|
$(top_builddir)/contrib/spi/autoinc$(DLSUFFIX): $(top_srcdir)/contrib/spi/autoinc.c
|
||||||
|
$(MAKE) -C $(top_builddir)/contrib/spi autoinc$(DLSUFFIX)
|
||||||
|
|
||||||
.PHONY: all-spi
|
|
||||||
all-spi:
|
|
||||||
$(MAKE) -C $(contribdir)/spi refint$(DLSUFFIX) autoinc$(DLSUFFIX)
|
|
||||||
|
|
||||||
# Tablespace setup
|
# Tablespace setup
|
||||||
|
|
||||||
|
all: tablespace-setup
|
||||||
|
|
||||||
.PHONY: tablespace-setup
|
.PHONY: tablespace-setup
|
||||||
tablespace-setup:
|
tablespace-setup:
|
||||||
rm -rf ./testtablespace
|
rm -rf ./testtablespace
|
||||||
mkdir ./testtablespace
|
mkdir ./testtablespace
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
## Run tests
|
## Run tests
|
||||||
##
|
##
|
||||||
@ -162,8 +173,7 @@ bigcheck: all
|
|||||||
|
|
||||||
clean distclean maintainer-clean: clean-lib
|
clean distclean maintainer-clean: clean-lib
|
||||||
# things built by `all' target
|
# things built by `all' target
|
||||||
rm -f $(OBJS)
|
rm -f $(OBJS) refint$(DLSUFFIX) autoinc$(DLSUFFIX)
|
||||||
$(MAKE) -C $(contribdir)/spi clean
|
|
||||||
rm -f $(output_files) $(input_files) pg_regress_main.o pg_regress.o pg_regress$(X)
|
rm -f $(output_files) $(input_files) pg_regress_main.o pg_regress.o pg_regress$(X)
|
||||||
# things created by various check targets
|
# things created by various check targets
|
||||||
rm -rf testtablespace
|
rm -rf testtablespace
|
||||||
|
@ -24,17 +24,17 @@ CREATE FUNCTION int44out(city_budget)
|
|||||||
|
|
||||||
CREATE FUNCTION check_primary_key ()
|
CREATE FUNCTION check_primary_key ()
|
||||||
RETURNS trigger
|
RETURNS trigger
|
||||||
AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
|
AS '@abs_builddir@/refint@DLSUFFIX@'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
|
|
||||||
CREATE FUNCTION check_foreign_key ()
|
CREATE FUNCTION check_foreign_key ()
|
||||||
RETURNS trigger
|
RETURNS trigger
|
||||||
AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
|
AS '@abs_builddir@/refint@DLSUFFIX@'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
|
|
||||||
CREATE FUNCTION autoinc ()
|
CREATE FUNCTION autoinc ()
|
||||||
RETURNS trigger
|
RETURNS trigger
|
||||||
AS '@abs_builddir@/../../../contrib/spi/autoinc@DLSUFFIX@'
|
AS '@abs_builddir@/autoinc@DLSUFFIX@'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
|
|
||||||
CREATE FUNCTION funny_dup17 ()
|
CREATE FUNCTION funny_dup17 ()
|
||||||
|
@ -25,15 +25,15 @@ CREATE FUNCTION int44out(city_budget)
|
|||||||
NOTICE: argument type city_budget is only a shell
|
NOTICE: argument type city_budget is only a shell
|
||||||
CREATE FUNCTION check_primary_key ()
|
CREATE FUNCTION check_primary_key ()
|
||||||
RETURNS trigger
|
RETURNS trigger
|
||||||
AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
|
AS '@abs_builddir@/refint@DLSUFFIX@'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
CREATE FUNCTION check_foreign_key ()
|
CREATE FUNCTION check_foreign_key ()
|
||||||
RETURNS trigger
|
RETURNS trigger
|
||||||
AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
|
AS '@abs_builddir@/refint@DLSUFFIX@'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
CREATE FUNCTION autoinc ()
|
CREATE FUNCTION autoinc ()
|
||||||
RETURNS trigger
|
RETURNS trigger
|
||||||
AS '@abs_builddir@/../../../contrib/spi/autoinc@DLSUFFIX@'
|
AS '@abs_builddir@/autoinc@DLSUFFIX@'
|
||||||
LANGUAGE C;
|
LANGUAGE C;
|
||||||
CREATE FUNCTION funny_dup17 ()
|
CREATE FUNCTION funny_dup17 ()
|
||||||
RETURNS trigger
|
RETURNS trigger
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
@echo off
|
@echo off
|
||||||
REM $PostgreSQL: pgsql/src/tools/msvc/clean.bat,v 1.10 2008/02/06 15:13:25 mha Exp $
|
REM $PostgreSQL: pgsql/src/tools/msvc/clean.bat,v 1.11 2008/05/30 00:04:32 tgl Exp $
|
||||||
|
|
||||||
set DIST=0
|
set DIST=0
|
||||||
if "%1"=="dist" set DIST=1
|
if "%1"=="dist" set DIST=1
|
||||||
@ -65,6 +65,8 @@ if exist src\test\regress\tmp_check rd /s /q src\test\regress\tmp_check
|
|||||||
if exist contrib\spi\refint.dll del /q contrib\spi\refint.dll
|
if exist contrib\spi\refint.dll del /q contrib\spi\refint.dll
|
||||||
if exist contrib\spi\autoinc.dll del /q contrib\spi\autoinc.dll
|
if exist contrib\spi\autoinc.dll del /q contrib\spi\autoinc.dll
|
||||||
if exist src\test\regress\regress.dll del /q src\test\regress\regress.dll
|
if exist src\test\regress\regress.dll del /q src\test\regress\regress.dll
|
||||||
|
if exist src\test\regress\refint.dll del /q src\test\regress\refint.dll
|
||||||
|
if exist src\test\regress\autoinc.dll del /q src\test\regress\autoinc.dll
|
||||||
|
|
||||||
REM Clean up datafiles built with contrib
|
REM Clean up datafiles built with contrib
|
||||||
REM cd contrib
|
REM cd contrib
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
# -*-perl-*- hey - emacs - this is a perl file
|
# -*-perl-*- hey - emacs - this is a perl file
|
||||||
|
|
||||||
# $PostgreSQL: pgsql/src/tools/msvc/vcregress.pl,v 1.6 2007/11/13 22:49:47 tgl Exp $
|
# $PostgreSQL: pgsql/src/tools/msvc/vcregress.pl,v 1.7 2008/05/30 00:04:32 tgl Exp $
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
@ -36,8 +36,8 @@ else
|
|||||||
# use a capital C here because config.pl has $config
|
# use a capital C here because config.pl has $config
|
||||||
my $Config = -e "release/postgres/postgres.exe" ? "Release" : "Debug";
|
my $Config = -e "release/postgres/postgres.exe" ? "Release" : "Debug";
|
||||||
|
|
||||||
copy("$Config/refint/refint.dll","contrib/spi");
|
copy("$Config/refint/refint.dll","src/test/regress");
|
||||||
copy("$Config/autoinc/autoinc.dll","contrib/spi");
|
copy("$Config/autoinc/autoinc.dll","src/test/regress");
|
||||||
copy("$Config/regress/regress.dll","src/test/regress");
|
copy("$Config/regress/regress.dll","src/test/regress");
|
||||||
|
|
||||||
$ENV{PATH} = "../../../$Config/libpq;../../$Config/libpq;$ENV{PATH}";
|
$ENV{PATH} = "../../../$Config/libpq;../../$Config/libpq;$ENV{PATH}";
|
||||||
|
Reference in New Issue
Block a user