1 kumpf 1.1 include $(PEGASUS_ROOT)/mak/config.mak
2 include $(PEGASUS_ROOT)/mak/test.mak
3
4 system = localhost
5
6 ###############################################################################
7 ##
8 ## Test Makefile for Pegasus CIMOM
9 ##
10 ## Options:
11 ## rebuild - Rebuild
12 ## build - Build
13 ## prestarttests - Execute functional tests
14 ## poststarttests - Execute poststarttests (No security, No SSL)
15 ## tests - Execute prestarttests and poststarttests
16 ## standardtests - Execute poststartests and a series of
17 ## posstarttests using multiple options.
18 ##
19 ###############################################################################
20
21 ###############################################################################
22 kumpf 1.1 ##
23 ## Platform specific settings for several platforms.
24 ##
25 ## NOTE: Please add platform specific environment variables as appropriate.
26 ##
27 ###############################################################################
28
29 ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
30 CIMSERVER_START_SERVICE = start cimserver
31 CIMSERVER_STOP_SERVICE =
32 SLEEP =
33 REMOVE_PEGASUS_DIRECTORY = mu rmdirhier pegasus
34 MUEXE = mu.exe
35 COPYMU = copy src\utils\mu\$(MUEXE) /y $(MUEXE)
36 MKDIR = src/utils/mu/mu mkdirhier
37 TESTS = prestarttests
38 endif
39
|
40 kumpf 1.2 ifeq ($(OS),HPUX)
|
41 kumpf 1.1 CIMSERVER_START_SERVICE = cimserver
42 CIMSERVER_STOP_SERVICE = cimserver -s
43 SLEEP = sleep 5
44 MUEXE = mu
45 COPYMU = cp -f src/utils/mu/$(MUEXE) $(BIN_DIR)/$(MUEXE)
46 MKDIR = src/utils/mu/mu mkdirhier
47 TESTS = prestarttests poststarttests
48 endif
49
50 ifeq ($(PEGASUS_PLATFORM),LINUX_IX86_GNU)
51 CIMSERVER_START_SERVICE = cimserver
52 CIMSERVER_STOP_SERVICE = /bin/ps -ef | /bin/grep cimserver | /bin/grep -v grep | /usr/bin/awk '{print "kill -9 "$$2 |"/bin/bash"}'
53 SLEEP = sleep 5
54 MUEXE = mu
55 COPYMU = cp -f src/utils/mu/$(MUEXE) $(BIN_DIR)/$(MUEXE)
56 MKDIR = src/utils/mu/mu mkdirhier
57 TESTS = prestarttests poststarttests
58 endif
59
60 ifeq ($(PEGASUS_PLATFORM),LINUX_IA64_GNU)
61 CIMSERVER_START_SERVICE = cimserver
62 kumpf 1.1 CIMSERVER_STOP_SERVICE = /bin/ps -ef | /bin/grep cimserver | /bin/grep -v grep | /usr/bin/awk '{print "kill -9 "$$2 |"/bin/bash"}'
63 SLEEP = sleep 5
64 MUEXE = mu
65 COPYMU = cp -f src/utils/mu/$(MUEXE) $(BIN_DIR)/$(MUEXE)
66 MKDIR = src/utils/mu/mu mkdirhier
67 TESTS = prestarttests poststarttests
68 endif
69
70 error:
71 @ echo "Specify desired makefile option (i.e., build, rebuild)"
72
73 buildmu:
74 $(MAKE) --directory=src/utils/mu -f Makefile
75 $(MKDIR) $(BIN_DIR)
76 $(COPYMU)
77
78 rebuild: clean buildmu all
79
80 build: all
81
82 all: buildmu
83 kumpf 1.1 $(MAKE) -f Makefile depend
84 $(MAKE) -f Makefile all
85
86 doc:
87 $(MAKE) --directory=doc/ProviderSpec -f Makefile
88 $(MAKE) --directory=doc/DevManual -f Makefile
89
90 clean:
91 $(MAKE) -f Makefile clean
92
93 repositoryServer:
94 $(CIMSERVER_STOP_SERVICE)
95 $(SLEEP)
96 $(RMDIRHIER) $(REPOSITORY_ROOT)
97 $(CIMSERVER_START_SERVICE)
98 $(SLEEP)
99 $(MAKE) -f Makefile repositoryServer
100 $(MAKE) -f Makefile testrepositoryServer
101
102 prestarttests:
103 $(CIMSERVER_STOP_SERVICE)
104 kumpf 1.1 $(SLEEP)
105 $(MAKE) -f Makefile repository
106 $(MAKE) -f Makefile testrepository
107 $(MAKE) -f Makefile tests
108 $(MAKE) --directory=src/Server -f Makefile install
109
110 poststarttests:
111 $(MAKE) --directory=test/wetest -f Makefile clean
112 $(CIMSERVER_START_SERVICE)
113 $(SLEEP)
114 $(MAKE) -f Makefile poststarttests
115
116 tests: $(TESTS)
117 @ echo Finished Tests
118
119 ###############################################################################
120 ##
121 ## Trace Configuration
122 ##
123 ## Options:
124 ## XMLTraceOn: Enables XML request and response tracing.
125 kumpf 1.1 ## ProviderLoadTraceOn: Enables Provider load tracing.
126 ## XML+ProviderLoadTraceOn: Enables both XML request/response and Provider
127 ## load tracing.
128 ## AllTraceOn: Enables all tracing.
129 ## AllTraceOff: Disables all tracing.
130 ## list: Lists trace settings.
131 ##
132 ###############################################################################
133
134 XMLTraceOn:
135 cimconfig -s traceComponents=XmlIO -c
136 cimconfig -s traceLevel=3 -c
137 cimconfig -g traceComponents
138 cimconfig -g traceLevel
139
140 ProviderLoadTraceOn:
141 cimconfig -s traceComponents=ProvManager,OsAbstraction
142 cimconfig -s traceLevel=3 -c
143 cimconfig -g traceComponents
144 cimconfig -g traceLevel
145
146 kumpf 1.1 XML+ProviderLoadTraceOn:
147 cimconfig -s traceComponents=XmlIO,ProvManager,OsAbstraction
148 cimconfig -s traceLevel=3 -c
149 cimconfig -g traceComponents
150 cimconfig -g traceLevel
151
152 AllTraceOn:
153 cimconfig -s traceComponents=ALL
154 cimconfig -s traceLevel=3 -c
155 cimconfig -g traceComponents
156 cimconfig -g traceLevel
157
158 AllTraceOff:
159 cimconfig -s traceComponents=
160 cimconfig -g traceComponents
161 cimconfig -g traceLevel
162
163 list:
164 cimconfig -g traceComponents
165 cimconfig -g traceLevel
166 cimconfig -g traceFilePath
167 kumpf 1.1
168 # DO NOT DELETE
169
170 standardtests:
171 $(MAKE) -f TestMakefile -i DisableSecurity
172 $(MAKE) -f TestMakefile TestCimmof
173 $(MAKE) -f TestMakefile TestNoSecurity
174 $(MAKE) -f TestMakefile EnableAuthentication
175 $(MAKE) -f TestMakefile TestLocalSecurity
|
176 kumpf 1.3 $(MAKE) -f TestMakefile TestRemoteSecurity
|
177 kumpf 1.4 $(MAKE) -f TestMakefile EnableAuthorization
178 $(MAKE) -f TestMakefile TestAuthorization
|
179 kumpf 1.1
180 TestNoSecurity:
181 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile tests
182 $(MAKE) -f TestMakefile RunTestClientLocal
183
184 TestLocalSecurity:
185 $(MAKE) -f TestMakefile RunTestClientLocal
186 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests HOSTNAME= PORT= USER= PASSWORD= SECURITY_ENABLED=true
187
188 TestRemoteSecurity:
189 TestClient -user guest -password guest $(system):5988
190 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/static -f Makefile poststarttests HOSTNAME=-h$(system) USER=-uguest PASSWORD=-wguest SECURITY_ENABLED=true
191
192 TestAuthorization:
|
193 kumpf 1.4 DeleteNamespace -a -user guest -password guest
|
194 kumpf 1.1 $(MAKE) -f TestMakefile RunTestClientLocal
|
195 kumpf 1.4 TestClient -user guest -password guest $(system):5988
196 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/static -f Makefile poststarttests HOSTNAME=-h$(system) USER=-uguest PASSWORD=-wguest SECURITY_ENABLED=true
|
197 kumpf 1.1
198 TestSubscriptions:
199 $(MAKE) -f TestMakefile DisableSecurity
200 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
201 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
202 $(MAKE) -f TestMakefile startcimWithoutSSL
203 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/cimv2/Subscription -f Makefile poststarttests
204 $(MAKE) -f TestMakefile stopcim
205
206 TestCimmof:
207 $(MAKE) -f Testcimmof poststarttests
208
209
210 RunTestClientLocal:
211 TestClient -local
212
213 DisableSecurity:
214 $(MAKE) -f TestMakefile -i stopcim
215 cimconfig -s enableAuthentication=false -p
216 cimconfig -s enableNamespaceAuthorization=false -p
217
218 kumpf 1.1 EnableAuthentication:
219 $(MAKE) -f TestMakefile -i stopcim
220 cimconfig -s enableAuthentication=true -p
221 $(MAKE) -f TestMakefile startcimWithoutSSL
222 $(MAKE) -f TestMakefile ConfigureUsers
223
224 EnableAuthorization:
225 $(MAKE) -f TestMakefile -i stopcim
226 cimconfig -s enableAuthorization=true -p
227 $(MAKE) -f TestMakefile startcimWithoutSSL
228 $(MAKE) -f TestMakefile -i ConfigureAuthorizations
229
230 EnableSSL:
231 $(MAKE) -f TestMakefile -i stopcim
232 $(MAKE) -f TestMakefile startcimWithSSL
233
234 ConfigureUsers:
235 ifndef PEGASUS_PAM_AUTHENTICATION
236 cimuser -a -u guest -w guest
237 endif
238
239 kumpf 1.1 ConfigureAuthorizations:
240 cimauth -a -u guest -n test/cimv2 -R -W
241 cimauth -a -u guest -n root/cimv2 -R -W
242 cimauth -a -u guest -n test/static -R -W
243 cimauth -a -u guest -n root/SampleProvider -R -W
244 cimauth -a -u guest -n root -R -W
245 cimauth -a -u guest -n test1 -R -W
246 cimauth -a -u guest -n test2 -R -W
247 cimauth -a -u guest -n test3 -R -W
248 cimauth -a -u guest -n test4 -R -W
249 cimauth -a -u guest -n test5 -R -W
250 cimauth -a -u guest -n test6 -R -W
251 cimauth -a -u guest -n test1/test2 -R -W
252 cimauth -a -u guest -n test1/test2/test3 -R -W
253 cimauth -a -u guest -n test1/test2/test3/test4 -R -W
254 cimauth -a -u guest -n test1/test2/test3/test4/test5 -R -W
255 cimauth -a -u guest -n test1/test2/test3/test4/test5/test6 -R -W
256
257 startcimWithoutSSL:
258 cimserver
259 sleep 10
260 kumpf 1.1
261 startcimWithSSL:
262 cimserver SSL=true
263 sleep 10
264
265 stopcim:
266 $(CIMSERVER_STOP_SERVICE)
267 sleep 5
268
269 rebuild:
270 $(MAKE) -f TestMakefile -i stopcim
271 rm -f rebuild.txt
272 $(MAKE) -f TestMakefile pegasus >> rebuild.txt 2>&1
273
274 pegasus:
275 $(MAKE) -f Makefile rebuild
276
|