Skip to content

Commit 245686d

Browse files
committed
modifications to regressoin tests
1 parent 668aa24 commit 245686d

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

src/test/regress/Makefile

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
#
99
# IDENTIFICATION
10-
# $Header: /cvsroot/pgsql/src/test/regress/Makefile,v 1.1.1.1 1996/07/09 06:22:24 scrappy Exp $
10+
# $Header: /cvsroot/pgsql/src/test/regress/Makefile,v 1.2 1996/07/23 03:19:34 scrappy Exp $
1111
#
1212
#-------------------------------------------------------------------------
1313

@@ -34,7 +34,7 @@ DLOBJS= regress$(SLSUFF)
3434
# ... plus test query inputs
3535
#
3636
CREATEFILES= $(DLOBJS:%=$(objdir)/%) \
37-
create.sql queries.sql errors.sql destroy.sql security.sql
37+
create.sql queries.sql errors.sql destroy.sql security.sql expected.out
3838

3939

4040
OUTFILES= stud_emp.data onek.data regress.out aportal.out
@@ -45,6 +45,32 @@ $(OUTFILES): $(CREATEFILES)
4545
$(SHELL) ./regress.sh 2>&1 | tee $(objdir)/regress.out
4646
@echo "RESULTS OF REGRESSION ARE SAVED IN $(objdir)/regress.out"
4747

48+
#
49+
# expected results file
50+
#
51+
expected.out: expected.in
52+
if [ -z "$$USER" ]; then USER=$$LOGNAME; fi; \
53+
if [ -z "$$USER" ]; then USER=`whoami`; fi; \
54+
if [ -z "$$USER" ]; then echo 'Cannot deduce $USER.'; exit 1; fi; \
55+
rm -f $(objdir)/expected.out; \
56+
C="`pwd`"; \
57+
sed -e "s:_CWD_:$$C:g" \
58+
-e "s:_OBJWD_:$$C/$(objdir):g" \
59+
-e "s/_USER_/$$USER/g" < expected.in > $(objdir)/expected.out
60+
61+
#
62+
# make a new expected results file from the current 'results.out'
63+
# rename 'expected.new' to 'expected.in' by hand to avoid circular makes
64+
#
65+
expected.new: regress.out
66+
if [ -z "$$USER" ]; then USER=$$LOGNAME; fi; \
67+
if [ -z "$$USER" ]; then USER=`whoami`; fi; \
68+
if [ -z "$$USER" ]; then echo 'Cannot deduce $USER.'; exit 1; fi; \
69+
C="`pwd`"; \
70+
sed -e "s:$$C:_CWD_:g" \
71+
-e "s:$$C/$(objdir):_OBJWD_:g" \
72+
-e "s/$$USER/_USER_/g" < $(objdir)/regress.out > expected.new
73+
4874
#
4975
# prepare to run the test (including clean-up after the last run)
5076
#
@@ -54,7 +80,7 @@ all:: $(CREATEFILES)
5480
#
5581
# run the test
5682
#
57-
runtest: regress.out
83+
runtest: expected.out regress.out
5884

5985
#
6086
# installation

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy