File: test-Makefile-template

package info (click to toggle)
libapache2-mod-rpaf 0.6-7%2Bwheezy1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 176 kB
  • sloc: ansic: 302; perl: 122; makefile: 49; sh: 33
file content (121 lines) | stat: -rw-r--r-- 3,360 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# Makefile for mod_rpaf.c tests (gmake)
# $Id: test-Makefile-template 19 2008-01-02 02:55:18Z thomas $
HTTPD=@@HTTPD@@ -d . -f httpd-rpaf.conf -X
HTTPD2=@@HTTPD2@@ -d . -f httpd-rpaf.conf-2.0 -X

default:
	@echo please run make test or make test-2.0 
	@echo from the root directory of your rpaf sources

test:
	rm -f rpaf-error_log rpaf_access_log
	@echo running rpaf apache 1.3.x tests
	@echo test 1 - no rpaf
	@echo starting apache ..
	@$(HTTPD) -D test1 &
	@./run_test.pl test1
	@echo stopping apache ..
	@kill -HUP `cat httpd.pid`
	@rm httpd.pid
	@echo test 2 - rpaf enabled
	@echo starting apache ..
	@$(HTTPD) -D test2 &
	@./run_test.pl test2
	@echo stopping apache ..
	@kill -HUP `cat httpd.pid`
	@rm httpd.pid
	@echo test 3 - rpaf enabled - sethostname enabled
	@echo starting apache ..
	@$(HTTPD) -D test3 &
	@./run_test.pl test3
	@echo stopping apache ..
	@kill -HUP `cat httpd.pid`
	@rm httpd.pid
	@echo test 4 - rpaf enabled - sethostname enabled - specifying header
	@echo setting X-Forwarded-For
	@echo starting apache ..
	@$(HTTPD) -D test4 &
	@./run_test.pl test4
	@echo stopping apache ..
	@kill -HUP `cat httpd.pid`
	@rm httpd.pid
	@echo test 5 - rpaf enabled - sethostname enabled - specifying header
	@echo setting X-Real-IP
	@echo starting apache ..
	@$(HTTPD) -D test5 &
	@./run_test.pl test5
	@echo stopping apache ..
	@kill -HUP `cat httpd.pid`
	@rm httpd.pid
	@echo test 6 - X-Forwarded-For Keep-Alive test
	@echo starting apache ..
	@$(HTTPD) -D test6 &
	@./run_test.pl test6
	@echo stopping apache ..
	@kill -HUP `cat httpd.pid`
	@rm httpd.pid
	@echo test 7 - X-Forwarded-For Keep-Alive test with HostNameLookups On
	@echo starting apache ..
	@$(HTTPD) -D test7 &
	@./run_test.pl test7
	@echo stopping apache ..
	@kill -HUP `cat httpd.pid`
	@rm httpd.pid

test-2.0:
	rm -f rpaf-error_log rpaf-access_log
	@echo running rpaf apache 2.x.x tests
	@echo test 1 - no rpaf
	@echo starting apache ..
	@$(HTTPD2) -D test1 &
	@./run_test.pl test1
	@echo stopping apache ..
	@kill -9 `cat httpd.pid`
	@rm httpd.pid
	@echo test 2 - rpaf enabled
	@echo starting apache ..
	@$(HTTPD2) -D test2 &
	@./run_test.pl test2
	@echo stopping apache ..
	@kill -9 `cat httpd.pid`
	@rm httpd.pid
	@echo test 3 - rpaf enabled - sethostname enabled
	@echo starting apache ..
	@$(HTTPD2) -D test3 &
	@./run_test.pl test3
	@echo stopping apache ..
	@kill -9 `cat httpd.pid`
	@rm httpd.pid
	@echo test 4 - rpaf enabled - sethostname enabled - specifying header
	@echo setting X-Forwarded-For
	@echo starting apache ..
	@$(HTTPD2) -D test4 &
	@./run_test.pl test4
	@echo stopping apache ..
	@kill -9 `cat httpd.pid`
	@rm httpd.pid
	@echo test 5 - rpaf enabled - sethostname enabled - specifying header
	@echo setting X-Real-IP
	@echo starting apache ..
	@$(HTTPD2) -D test5 &
	@./run_test.pl test5
	@echo stopping apache ..
	@kill -9 `cat httpd.pid`
	@rm httpd.pid
	@echo test 6 - X-Forwarded-For Keep-Alive test
	@echo starting apache ..
	@$(HTTPD2) -D test6 &
	@./run_test.pl test6
	@echo stopping apache ..
	@kill -9 `cat httpd.pid`
	@rm httpd.pid
	@echo test 7 - X-Forwarded-For Keep-Alive test with HostNameLookups On
	@echo starting apache ..
	@$(HTTPD2) -D test7 &
	@./run_test.pl test7
	@echo stopping apache ..
	@kill -9 `cat httpd.pid`
	@rm httpd.pid

clean:
	rm -rf httpd.pid rpaf-access_log rpaf-error_log httpd-rpaf.conf httpd-rpaf.conf-2.0 Makefile