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 tony 1.5 CIMSERVER_START_SERVICE = cimserver -start
31 CIMSERVER_STOP_SERVICE = cimserver -stop
|
32 kumpf 1.1 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 tony 1.5 TESTS = prestarttests poststarttests
|
38 kumpf 1.1 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 mday 1.6 CIMSERVER_STOP_SERVICE = ps -ef | grep cimserver | grep -v grep | awk '{print "kill -9 "$$2 |"/bin/bash"}'
|
53 kumpf 1.1 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 mday 1.6 CIMSERVER_STOP_SERVICE = ps -ef | grep cimserver | grep -v grep | awk '{print "kill -9 "$$2 |"/bin/bash"}'
|
63 kumpf 1.1 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 mday 1.6 $(MAKE) --directory=$(PEGASUS_ROOT)/src/utils/mu -f Makefile
|
75 kumpf 1.1 $(MKDIR) $(BIN_DIR)
76 $(COPYMU)
77
78 rebuild: clean buildmu all
79
80 build: all
81
82 all: buildmu
83 $(MAKE) -f Makefile depend
84 $(MAKE) -f Makefile all
85
86 doc:
|
87 mday 1.6 $(MAKE) --directory=$(PEGASUS_ROOT)/doc/ProviderSpec -f Makefile
88 $(MAKE) --directory=$(PEGASUS_ROOT)/doc/DevManual -f Makefile
|
89 kumpf 1.1
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 mday 1.6
|
102 kumpf 1.1 prestarttests:
103 $(CIMSERVER_STOP_SERVICE)
104 $(SLEEP)
105 $(MAKE) -f Makefile repository
106 $(MAKE) -f Makefile testrepository
107 $(MAKE) -f Makefile tests
|
108 mday 1.6 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install
|
109 kumpf 1.1
110 poststarttests:
|
111 mday 1.6 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile clean
|
112 kumpf 1.1 $(CIMSERVER_START_SERVICE)
113 $(SLEEP)
114 $(MAKE) -f Makefile poststarttests
115
116 tests: $(TESTS)
|
117 tony 1.5 ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
118 $(CIMSERVER_STOP_SERVICE)
|
119 mday 1.6 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile uninstall
|
120 tony 1.5 endif
|
121 kumpf 1.1 @ echo Finished Tests
122
123 ###############################################################################
124 ##
125 ## Trace Configuration
126 ##
127 ## Options:
128 ## XMLTraceOn: Enables XML request and response tracing.
129 ## ProviderLoadTraceOn: Enables Provider load tracing.
130 ## XML+ProviderLoadTraceOn: Enables both XML request/response and Provider
131 ## load tracing.
132 ## AllTraceOn: Enables all tracing.
133 ## AllTraceOff: Disables all tracing.
134 ## list: Lists trace settings.
135 ##
136 ###############################################################################
137
138 XMLTraceOn:
139 cimconfig -s traceComponents=XmlIO -c
140 cimconfig -s traceLevel=3 -c
141 cimconfig -g traceComponents
142 kumpf 1.1 cimconfig -g traceLevel
143
144 ProviderLoadTraceOn:
145 cimconfig -s traceComponents=ProvManager,OsAbstraction
146 cimconfig -s traceLevel=3 -c
147 cimconfig -g traceComponents
148 cimconfig -g traceLevel
149
150 XML+ProviderLoadTraceOn:
151 cimconfig -s traceComponents=XmlIO,ProvManager,OsAbstraction
152 cimconfig -s traceLevel=3 -c
153 cimconfig -g traceComponents
154 cimconfig -g traceLevel
155
156 AllTraceOn:
157 cimconfig -s traceComponents=ALL
158 cimconfig -s traceLevel=3 -c
159 cimconfig -g traceComponents
160 cimconfig -g traceLevel
161
162 AllTraceOff:
163 kumpf 1.1 cimconfig -s traceComponents=
164 cimconfig -g traceComponents
165 cimconfig -g traceLevel
166
167 list:
168 cimconfig -g traceComponents
169 cimconfig -g traceLevel
170 cimconfig -g traceFilePath
171
172 # DO NOT DELETE
173
174 standardtests:
175 $(MAKE) -f TestMakefile -i DisableSecurity
176 $(MAKE) -f TestMakefile TestCimmof
177 $(MAKE) -f TestMakefile TestNoSecurity
178 $(MAKE) -f TestMakefile EnableAuthentication
179 $(MAKE) -f TestMakefile TestLocalSecurity
|
180 kumpf 1.3 $(MAKE) -f TestMakefile TestRemoteSecurity
|
181 kumpf 1.4 $(MAKE) -f TestMakefile EnableAuthorization
182 $(MAKE) -f TestMakefile TestAuthorization
|
183 kumpf 1.1
184 TestNoSecurity:
185 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile tests
186 $(MAKE) -f TestMakefile RunTestClientLocal
187
188 TestLocalSecurity:
189 $(MAKE) -f TestMakefile RunTestClientLocal
190 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests HOSTNAME= PORT= USER= PASSWORD= SECURITY_ENABLED=true
191
192 TestRemoteSecurity:
193 TestClient -user guest -password guest $(system):5988
194 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/static -f Makefile poststarttests HOSTNAME=-h$(system) USER=-uguest PASSWORD=-wguest SECURITY_ENABLED=true
195
196 TestAuthorization:
|
197 kumpf 1.4 DeleteNamespace -a -user guest -password guest
|
198 kumpf 1.1 $(MAKE) -f TestMakefile RunTestClientLocal
|
199 kumpf 1.4 TestClient -user guest -password guest $(system):5988
200 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/static -f Makefile poststarttests HOSTNAME=-h$(system) USER=-uguest PASSWORD=-wguest SECURITY_ENABLED=true
|
201 kumpf 1.1
202 TestSubscriptions:
203 $(MAKE) -f TestMakefile DisableSecurity
204 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
205 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
206 $(MAKE) -f TestMakefile startcimWithoutSSL
207 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/cimv2/Subscription -f Makefile poststarttests
208 $(MAKE) -f TestMakefile stopcim
209
210 TestCimmof:
211 $(MAKE) -f Testcimmof poststarttests
212
213
214 RunTestClientLocal:
215 TestClient -local
216
217 DisableSecurity:
218 $(MAKE) -f TestMakefile -i stopcim
219 cimconfig -s enableAuthentication=false -p
220 cimconfig -s enableNamespaceAuthorization=false -p
221
222 kumpf 1.1 EnableAuthentication:
223 $(MAKE) -f TestMakefile -i stopcim
224 cimconfig -s enableAuthentication=true -p
225 $(MAKE) -f TestMakefile startcimWithoutSSL
226 $(MAKE) -f TestMakefile ConfigureUsers
227
228 EnableAuthorization:
229 $(MAKE) -f TestMakefile -i stopcim
230 cimconfig -s enableAuthorization=true -p
231 $(MAKE) -f TestMakefile startcimWithoutSSL
232 $(MAKE) -f TestMakefile -i ConfigureAuthorizations
233
234 EnableSSL:
235 $(MAKE) -f TestMakefile -i stopcim
236 $(MAKE) -f TestMakefile startcimWithSSL
237
238 ConfigureUsers:
239 ifndef PEGASUS_PAM_AUTHENTICATION
240 cimuser -a -u guest -w guest
241 endif
242
243 kumpf 1.1 ConfigureAuthorizations:
244 cimauth -a -u guest -n test/cimv2 -R -W
245 cimauth -a -u guest -n root/cimv2 -R -W
246 cimauth -a -u guest -n test/static -R -W
247 cimauth -a -u guest -n root/SampleProvider -R -W
248 cimauth -a -u guest -n root -R -W
249 cimauth -a -u guest -n test1 -R -W
250 cimauth -a -u guest -n test2 -R -W
251 cimauth -a -u guest -n test3 -R -W
252 cimauth -a -u guest -n test4 -R -W
253 cimauth -a -u guest -n test5 -R -W
254 cimauth -a -u guest -n test6 -R -W
255 cimauth -a -u guest -n test1/test2 -R -W
256 cimauth -a -u guest -n test1/test2/test3 -R -W
257 cimauth -a -u guest -n test1/test2/test3/test4 -R -W
258 cimauth -a -u guest -n test1/test2/test3/test4/test5 -R -W
259 cimauth -a -u guest -n test1/test2/test3/test4/test5/test6 -R -W
260
261 startcimWithoutSSL:
262 cimserver
263 sleep 10
264 kumpf 1.1
265 startcimWithSSL:
266 cimserver SSL=true
267 sleep 10
268
269 stopcim:
270 $(CIMSERVER_STOP_SERVICE)
271 sleep 5
272
273 rebuild:
274 $(MAKE) -f TestMakefile -i stopcim
275 rm -f rebuild.txt
276 $(MAKE) -f TestMakefile pegasus >> rebuild.txt 2>&1
277
278 pegasus:
279 $(MAKE) -f Makefile rebuild
280
|