7
7
#
8
8
#
9
9
# 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 $
11
11
#
12
12
# -------------------------------------------------------------------------
13
13
@@ -34,7 +34,7 @@ DLOBJS= regress$(SLSUFF)
34
34
# ... plus test query inputs
35
35
#
36
36
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
38
38
39
39
40
40
OUTFILES = stud_emp.data onek.data regress.out aportal.out
@@ -45,6 +45,32 @@ $(OUTFILES): $(CREATEFILES)
45
45
$(SHELL ) ./regress.sh 2>&1 | tee $(objdir ) /regress.out
46
46
@echo " RESULTS OF REGRESSION ARE SAVED IN $( objdir) /regress.out"
47
47
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
+
48
74
#
49
75
# prepare to run the test (including clean-up after the last run)
50
76
#
@@ -54,7 +80,7 @@ all:: $(CREATEFILES)
54
80
#
55
81
# run the test
56
82
#
57
- runtest : regress.out
83
+ runtest : expected.out regress.out
58
84
59
85
#
60
86
# installation
0 commit comments