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
39 ifeq ($(PEGASUS_PLATFORM),DARWIN_PPC_GNU)
40 CIMSERVER_START_SERVICE = cimserver
41 CIMSERVER_STOP_SERVICE = cimserver -s; true
44 MKDIR = $(MUEXE) mkdirhier
45 TESTS = prestarttests poststarttests
49 CIMSERVER_START_SERVICE = cimserver
50 CIMSERVER_STOP_SERVICE = cimserver -s; true
53 MKDIR = $(MUEXE) mkdirhier
54 TESTS = prestarttests poststarttests
57 ifdef PEGASUS_PLATFORM_LINUX_GENERIC_GNU
58 CIMSERVER_START_SERVICE = cimserver
59 CIMSERVER_STOP_SERVICE = cimserver -s; true
62 MKDIR = $(MUEXE) mkdirhier
63 TESTS = prestarttests poststarttests
67 @ echo "Specify desired makefile option (i.e., build, rebuild)"
70 $(MAKE) --directory=$(PEGASUS_ROOT)/src/utils/mu -f Makefile
73 rebuild: clean buildmu all
78 $(MAKE) -f Makefile depend
79 $(MAKE) -f Makefile all
82 $(MAKE) --directory=$(PEGASUS_ROOT)/doc/ProviderSpec -f Makefile
83 $(MAKE) --directory=$(PEGASUS_ROOT)/doc/DevManual -f Makefile
86 $(MAKE) -f Makefile clean
89 $(CIMSERVER_STOP_SERVICE)
91 $(RMDIRHIER) $(REPOSITORY_ROOT)
92 $(CIMSERVER_START_SERVICE)
94 $(MAKE) -f Makefile repositoryServer
95 $(MAKE) -f Makefile testrepositoryServer
98 $(CIMSERVER_STOP_SERVICE)
100 $(MAKE) -f Makefile repository
101 $(MAKE) -f Makefile testrepository
102 $(MAKE) -f Makefile tests
103 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run
106 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile clean
107 $(CIMSERVER_START_SERVICE)
109 $(MAKE) -f Makefile poststarttests
112 ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
113 $(CIMSERVER_STOP_SERVICE)
114 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile uninstall
116 @ echo Finished Tests
118 ###############################################################################
120 ## Trace Configuration
123 ## XMLTraceOn: Enables XML request and response tracing.
124 ## ProviderLoadTraceOn: Enables Provider load tracing.
125 ## XML+ProviderLoadTraceOn: Enables both XML request/response and Provider
127 ## AllTraceOn: Enables all tracing.
128 ## AllTraceOff: Disables all tracing.
129 ## list: Lists trace settings.
131 ###############################################################################
134 cimconfig -s traceComponents=XmlIO -c
135 cimconfig -s traceLevel=3 -c
136 cimconfig -g traceComponents
137 cimconfig -g traceLevel
140 cimconfig -s traceComponents=ProvManager,OsAbstraction
141 cimconfig -s traceLevel=3 -c
142 cimconfig -g traceComponents
143 cimconfig -g traceLevel
145 XML+ProviderLoadTraceOn:
146 cimconfig -s traceComponents=XmlIO,ProvManager,OsAbstraction
147 cimconfig -s traceLevel=3 -c
148 cimconfig -g traceComponents
149 cimconfig -g traceLevel
152 cimconfig -s traceComponents=ALL
153 cimconfig -s traceLevel=3 -c
154 cimconfig -g traceComponents
155 cimconfig -g traceLevel
158 cimconfig -s traceComponents=
159 cimconfig -g traceComponents
160 cimconfig -g traceLevel
163 cimconfig -g traceComponents
164 cimconfig -g traceLevel
165 cimconfig -g traceFilePath
170 $(MAKE) -f TestMakefile -i DisableSecurity
171 $(MAKE) -f TestMakefile TestCimmof
172 $(MAKE) -f TestMakefile TestNoSecurity
173 $(MAKE) -f TestMakefile EnableAuthentication
174 $(MAKE) -f TestMakefile TestLocalSecurity
175 $(MAKE) -f TestMakefile TestRemoteSecurity
176 $(MAKE) -f TestMakefile EnableAuthorization
177 $(MAKE) -f TestMakefile TestAuthorization
180 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile tests
181 $(MAKE) -f TestMakefile RunTestClientLocal
184 $(MAKE) -f TestMakefile RunTestClientLocal
185 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests HOSTNAME= PORT= USER= PASSWORD= SECURITY_ENABLED=true
188 TestClient -user guest -password guest $(system):5988
189 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/static -f Makefile poststarttests HOSTNAME=-h$(system) USER=-uguest PASSWORD=-wguest SECURITY_ENABLED=true
192 DeleteNamespace -a -user guest -password guest
193 $(MAKE) -f TestMakefile RunTestClientLocal
194 TestClient -user guest -password guest $(system):5988
195 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/static -f Makefile poststarttests HOSTNAME=-h$(system) USER=-uguest PASSWORD=-wguest SECURITY_ENABLED=true
198 $(MAKE) -f TestMakefile DisableSecurity
199 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
200 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
201 $(MAKE) -f TestMakefile startcimWithoutSSL
202 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/cimv2/Subscription -f Makefile poststarttests
203 $(MAKE) -f TestMakefile stopcim
206 $(MAKE) -f Testcimmof poststarttests
213 $(MAKE) -f TestMakefile -i stopcim
214 cimconfig -s enableAuthentication=false -p
215 cimconfig -s enableNamespaceAuthorization=false -p
217 EnableAuthentication:
218 $(MAKE) -f TestMakefile -i stopcim
219 cimconfig -s enableAuthentication=true -p
220 $(MAKE) -f TestMakefile startcimWithoutSSL
221 $(MAKE) -f TestMakefile ConfigureUsers
224 $(MAKE) -f TestMakefile -i stopcim
225 cimconfig -s enableNamespaceAuthorization=true -p
226 $(MAKE) -f TestMakefile startcimWithoutSSL
227 $(MAKE) -f TestMakefile -i ConfigureAuthorizations
230 $(MAKE) -f TestMakefile -i stopcim
231 $(MAKE) -f TestMakefile startcimWithSSL
234 ifndef PEGASUS_PAM_AUTHENTICATION
235 cimuser -a -u guest -w guest
238 ConfigureAuthorizations:
239 cimauth -a -u guest -n test/cimv2 -R -W
240 cimauth -a -u guest -n root/cimv2 -R -W
241 cimauth -a -u guest -n root/PG_Internal -R -W
242 cimauth -a -u guest -n root/PG_InterOp -R -W
243 cimauth -a -u guest -n root/benchmark -R -W
244 cimauth -a -u guest -n root/sampleprovider -R -W
245 cimauth -a -u guest -n test/static -R -W
246 cimauth -a -u guest -n root/SampleProvider -R -W
247 cimauth -a -u guest -n root -R -W
248 cimauth -a -u guest -n test1 -R -W
249 cimauth -a -u guest -n test2 -R -W
250 cimauth -a -u guest -n test3 -R -W
251 cimauth -a -u guest -n test4 -R -W
252 cimauth -a -u guest -n test5 -R -W
253 cimauth -a -u guest -n test6 -R -W
254 cimauth -a -u guest -n test1/test2 -R -W
255 cimauth -a -u guest -n test1/test2/test3 -R -W
256 cimauth -a -u guest -n test1/test2/test3/test4 -R -W
257 cimauth -a -u guest -n test1/test2/test3/test4/test5 -R -W
258 cimauth -a -u guest -n test1/test2/test3/test4/test5/test6 -R -W
265 cimserver enableHttpConnection=false enableHttpsConnection=true
269 $(CIMSERVER_STOP_SERVICE)
273 $(MAKE) -f TestMakefile -i stopcim
275 $(MAKE) -f TestMakefile pegasus >> rebuild.txt 2>&1
278 $(MAKE) -f Makefile rebuild