1 include $(PEGASUS_ROOT)/mak/config.mak
2 include $(PEGASUS_ROOT)/mak/test.mak
6 ###############################################################################
8 ## Test Makefile for Pegasus CIMOM
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.
19 ###############################################################################
21 ###############################################################################
23 ## Platform specific settings for several platforms.
25 ## NOTE: Please add platform specific environment variables as appropriate.
27 ###############################################################################
29 ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
30 CIMSERVER_START_SERVICE = cimserver -start
31 CIMSERVER_STOP_SERVICE = cimserver -stop
33 REMOVE_PEGASUS_DIRECTORY = mu rmdirhier pegasus
35 MKDIR = $(MUEXE) mkdirhier
36 TESTS = prestarttests poststarttests
40 CIMSERVER_START_SERVICE = cimserver
41 CIMSERVER_STOP_SERVICE = cimserver -s; true
44 MKDIR = $(MUEXE) mkdirhier
45 TESTS = prestarttests poststarttests
48 ifdef PEGASUS_PLATFORM_LINUX_GENERIC_GNU
49 CIMSERVER_START_SERVICE = cimserver
50 CIMSERVER_STOP_SERVICE = cimserver -s; true
53 MKDIR = $(MUEXE) mkdirhier
54 TESTS = prestarttests poststarttests
58 @ echo "Specify desired makefile option (i.e., build, rebuild)"
61 $(MAKE) --directory=$(PEGASUS_ROOT)/src/utils/mu -f Makefile
64 rebuild: clean buildmu all
69 $(MAKE) -f Makefile depend
70 $(MAKE) -f Makefile all
73 $(MAKE) --directory=$(PEGASUS_ROOT)/doc/ProviderSpec -f Makefile
74 $(MAKE) --directory=$(PEGASUS_ROOT)/doc/DevManual -f Makefile
77 $(MAKE) -f Makefile clean
80 $(CIMSERVER_STOP_SERVICE)
82 $(RMDIRHIER) $(REPOSITORY_ROOT)
83 $(CIMSERVER_START_SERVICE)
85 $(MAKE) -f Makefile repositoryServer
86 $(MAKE) -f Makefile testrepositoryServer
89 $(CIMSERVER_STOP_SERVICE)
91 $(MAKE) -f Makefile repository
92 $(MAKE) -f Makefile testrepository
93 $(MAKE) -f Makefile tests
94 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install
97 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile clean
98 $(CIMSERVER_START_SERVICE)
100 $(MAKE) -f Makefile poststarttests
103 ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
104 $(CIMSERVER_STOP_SERVICE)
105 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile uninstall
107 @ echo Finished Tests
109 ###############################################################################
111 ## Trace Configuration
114 ## XMLTraceOn: Enables XML request and response tracing.
115 ## ProviderLoadTraceOn: Enables Provider load tracing.
116 ## XML+ProviderLoadTraceOn: Enables both XML request/response and Provider
118 ## AllTraceOn: Enables all tracing.
119 ## AllTraceOff: Disables all tracing.
120 ## list: Lists trace settings.
122 ###############################################################################
125 cimconfig -s traceComponents=XmlIO -c
126 cimconfig -s traceLevel=3 -c
127 cimconfig -g traceComponents
128 cimconfig -g traceLevel
131 cimconfig -s traceComponents=ProvManager,OsAbstraction
132 cimconfig -s traceLevel=3 -c
133 cimconfig -g traceComponents
134 cimconfig -g traceLevel
136 XML+ProviderLoadTraceOn:
137 cimconfig -s traceComponents=XmlIO,ProvManager,OsAbstraction
138 cimconfig -s traceLevel=3 -c
139 cimconfig -g traceComponents
140 cimconfig -g traceLevel
143 cimconfig -s traceComponents=ALL
144 cimconfig -s traceLevel=3 -c
145 cimconfig -g traceComponents
146 cimconfig -g traceLevel
149 cimconfig -s traceComponents=
150 cimconfig -g traceComponents
151 cimconfig -g traceLevel
154 cimconfig -g traceComponents
155 cimconfig -g traceLevel
156 cimconfig -g traceFilePath
161 $(MAKE) -f TestMakefile -i DisableSecurity
162 $(MAKE) -f TestMakefile TestCimmof
163 $(MAKE) -f TestMakefile TestNoSecurity
164 $(MAKE) -f TestMakefile EnableAuthentication
165 $(MAKE) -f TestMakefile TestLocalSecurity
166 $(MAKE) -f TestMakefile TestRemoteSecurity
167 $(MAKE) -f TestMakefile EnableAuthorization
168 $(MAKE) -f TestMakefile TestAuthorization
171 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile tests
172 $(MAKE) -f TestMakefile RunTestClientLocal
175 $(MAKE) -f TestMakefile RunTestClientLocal
176 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests HOSTNAME= PORT= USER= PASSWORD= SECURITY_ENABLED=true
179 TestClient -user guest -password guest $(system):5988
180 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/static -f Makefile poststarttests HOSTNAME=-h$(system) USER=-uguest PASSWORD=-wguest SECURITY_ENABLED=true
183 DeleteNamespace -a -user guest -password guest
184 $(MAKE) -f TestMakefile RunTestClientLocal
185 TestClient -user guest -password guest $(system):5988
186 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/static -f Makefile poststarttests HOSTNAME=-h$(system) USER=-uguest PASSWORD=-wguest SECURITY_ENABLED=true
189 $(MAKE) -f TestMakefile DisableSecurity
190 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
191 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
192 $(MAKE) -f TestMakefile startcimWithoutSSL
193 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/cimv2/Subscription -f Makefile poststarttests
194 $(MAKE) -f TestMakefile stopcim
197 $(MAKE) -f Testcimmof poststarttests
204 $(MAKE) -f TestMakefile -i stopcim
205 cimconfig -s enableAuthentication=false -p
206 cimconfig -s enableNamespaceAuthorization=false -p
208 EnableAuthentication:
209 $(MAKE) -f TestMakefile -i stopcim
210 cimconfig -s enableAuthentication=true -p
211 $(MAKE) -f TestMakefile startcimWithoutSSL
212 $(MAKE) -f TestMakefile ConfigureUsers
215 $(MAKE) -f TestMakefile -i stopcim
216 cimconfig -s enableNamespaceAuthorization=true -p
217 $(MAKE) -f TestMakefile startcimWithoutSSL
218 $(MAKE) -f TestMakefile -i ConfigureAuthorizations
221 $(MAKE) -f TestMakefile -i stopcim
222 $(MAKE) -f TestMakefile startcimWithSSL
225 ifndef PEGASUS_PAM_AUTHENTICATION
226 cimuser -a -u guest -w guest
229 ConfigureAuthorizations:
230 cimauth -a -u guest -n test/cimv2 -R -W
231 cimauth -a -u guest -n root/cimv2 -R -W
232 cimauth -a -u guest -n root/PG_Internal -R -W
233 cimauth -a -u guest -n root/PG_InterOp -R -W
234 cimauth -a -u guest -n root/benchmark -R -W
235 cimauth -a -u guest -n root/sampleprovider -R -W
236 cimauth -a -u guest -n test/static -R -W
237 cimauth -a -u guest -n root/SampleProvider -R -W
238 cimauth -a -u guest -n root -R -W
239 cimauth -a -u guest -n test1 -R -W
240 cimauth -a -u guest -n test2 -R -W
241 cimauth -a -u guest -n test3 -R -W
242 cimauth -a -u guest -n test4 -R -W
243 cimauth -a -u guest -n test5 -R -W
244 cimauth -a -u guest -n test6 -R -W
245 cimauth -a -u guest -n test1/test2 -R -W
246 cimauth -a -u guest -n test1/test2/test3 -R -W
247 cimauth -a -u guest -n test1/test2/test3/test4 -R -W
248 cimauth -a -u guest -n test1/test2/test3/test4/test5 -R -W
249 cimauth -a -u guest -n test1/test2/test3/test4/test5/test6 -R -W
256 cimserver enableHttpConnection=false enableHttpsConnection=true
260 $(CIMSERVER_STOP_SERVICE)
264 $(MAKE) -f TestMakefile -i stopcim
266 $(MAKE) -f TestMakefile pegasus >> rebuild.txt 2>&1
269 $(MAKE) -f Makefile rebuild