BUG#: 8815
[tpot/pegasus/.git] / TestMakefile
1 #//%LICENSE////////////////////////////////////////////////////////////////
2 #//
3 #// Licensed to The Open Group (TOG) under one or more contributor license
4 #// agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
5 #// this work for additional information regarding copyright ownership.
6 #// Each contributor licenses this file to you under the OpenPegasus Open
7 #// Source License; you may not use this file except in compliance with the
8 #// License.
9 #//
10 #// Permission is hereby granted, free of charge, to any person obtaining a
11 #// copy of this software and associated documentation files (the "Software"),
12 #// to deal in the Software without restriction, including without limitation
13 #// the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 #// and/or sell copies of the Software, and to permit persons to whom the
15 #// Software is furnished to do so, subject to the following conditions:
16 #//
17 #// The above copyright notice and this permission notice shall be included
18 #// in all copies or substantial portions of the Software.
19 #//
20 #// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 #// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 #// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 #// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 #// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 #// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 #// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #//
28 #//////////////////////////////////////////////////////////////////////////
29 ###############################################################################
30 ##
31 ## Test Makefile for Pegasus CIMOM
32 ##
33 ## see the usage rule for documentation of rules etc.
34 ##
35 ##
36 ###############################################################################
37
38 error:
39         @ $(ECHO) "Specify desired makefile option (i.e., unittests, usage )"
40
41 include $(PEGASUS_ROOT)/mak/config.mak
42 include $(PEGASUS_ROOT)/mak/test.mak
43 include $(PEGASUS_ROOT)/mak/commands.mak
44
45 system = localhost
46
47 .PHONY: FORCE
48
49 FORCE:
50
51 usage: FORCE
52         $(USAGE)
53         $(USAGE)"TestMakefile Primary Targets:"
54         $(USAGE)
55         $(USAGE)"The following are all standalone tests. They stop and start the server,"
56         $(USAGE)"and build repositories as needed."
57         $(USAGE)
58         $(USAGE)"alltests           - Execute unittests and servertests"
59         $(USAGE)"unittests          - Execute the unit functional tests - no repository"
60         $(USAGE)"                     or active server is required"
61         $(USAGE)"servertests        - Execute a basic server test suites (No security, No SSL)"
62         $(USAGE)"standardtests      - Execute an extended server test suites "
63         $(USAGE)"                     using multiple options."
64         $(USAGE)"perftests          - Executes a brief server performance test"
65         $(USAGE)
66         $(USAGE)"usage2             - usage on secondary test targets"
67         $(USAGE)"usagetrace         - usage on trace targets"
68         $(USAGE)"stresstests        - Execute the default stress test suite"
69         $(USAGE)
70
71 usage2: FORCE
72         $(USAGE)
73         $(USAGE)"TestMakefile Secondary Targets:"
74         $(USAGE)
75         $(USAGE)"The following are run as part of the Primary target test suites and may"
76         $(USAGE)"also be invoked as standalone tests."
77         $(USAGE)
78         $(USAGE)"TestXMLRepository       - Executes poststarttests on XML repository"
79         $(USAGE)"                          built with cimmofl."
80         $(USAGE)"TestXMLRepositoryServer - Executes poststarttests on XML repository"
81         $(USAGE)"                          built with cimmof."
82         $(USAGE)"TestXMLCmpRepository    - Executes poststarttests on XML compressed"
83         $(USAGE)"                          repository built with cimmofl."
84         $(USAGE)"TestBinRepository       - Executes poststarttests on binary repository "
85         $(USAGE)"                          built with cimmofl."
86         $(USAGE)"TestBinRepositoryServer - Executes poststarttests on binary repository"
87         $(USAGE)"                          built with cimmof."
88         $(USAGE)"TestBinCmpRepository    - Executes poststarttests on binary compressed"
89         $(USAGE)"                          repository built with cimmofl."
90         $(USAGE)
91         $(USAGE)"The following require the repository to be pre-built."
92         $(USAGE)
93         $(USAGE)"run_SSL_CBA_TS1         - Executes the Certificate based authentication test suite."
94         $(USAGE)"run_SSL_IPV4_TS1        - Executes the IPv4 SSL connection test suite."
95         $(USAGE)"run_SSL_IPV6_TS1        - Executes the IPv6 SSL connection test suite."
96         $(USAGE)"run_OOP_TS1             - Executes the Out Of Process Provider tests"
97         $(USAGE)"run_G11N_TS1            - Executes the Globalization tests"
98         $(USAGE)
99         $(USAGE)"The following require the repository to be pre-built and the server to be started."
100         $(USAGE)
101         $(USAGE)"serversuite             - the collection of test run by the servertests rule"
102         $(USAGE)"run_STRESS_TS1          - Executes the stresstests"
103         $(USAGE)"slptests                - Executes the slptests"
104         $(USAGE)"run_Cmpi_Sub            - Executes the CMPI subscription tests"
105         $(USAGE)
106
107
108 ##########################################################
109 #
110 # rules that are defined in Makefile
111 #
112 ##########################################################
113
114 build: FORCE
115         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile build
116
117 world: FORCE
118         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile world
119
120 new: FORCE
121         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile new
122
123 clean: FORCE
124         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile clean
125
126 depend: FORCE
127         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile depend
128
129 ###############################################################################
130 #   mak/certificate_test.mak implements three key functions for
131 #   testing Certificate-Based Authentication (CBA).
132 #
133 #   setupCBATestCertificates is used to create a set of test certificates
134 #       make -f TestMakefile setupCBATestCertificates
135 #
136 #   runCBATestSuites is used to run a set of CBA tests
137 #       make -f TestMakefile runCBATestSuites
138 #
139 #   cleanupCBATestCertificates can be used to remove the test certificates
140 #       make -f TestMakefile cleanupCBATestCertificates
141 ###############################################################################
142 include $(PEGASUS_ROOT)/mak/certificate_test.mak
143
144 ############################################################
145 #
146 # rules defined here
147 #
148 ############################################################
149
150 ##
151 ## Although the macros CIMSERVER_STOP_SERVICE and CIMSERVER_START_SERVICE
152 ## are available and could be invoked directly, their direct usage is
153 ## discouraged in favor of invoking the cimstop and the cimstart rules
154 ## as this allows one place where additional checks, delays etc may be
155 ## added in the future to control or further test the servers performance
156 ## in executing these commands.
157 ##
158
159 #######################
160 #
161 # doc
162 #
163 doc:
164         $(MAKE) --directory=$(PEGASUS_ROOT)/doc/ProviderSpec -f Makefile
165         $(MAKE) --directory=$(PEGASUS_ROOT)/doc/DevManual -f Makefile
166
167
168 #######################
169 #
170 # repositoryServer
171 #
172 repositoryServer: FORCE
173         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
174         $(SLEEP) 5
175         $(RMREPOSITORY) $(REPOSITORY_ROOT)
176         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart
177         $(SLEEP) 5
178         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer
179         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer
180
181 ######################
182 #
183 # prestarttests is being deprecated since poststarttest is being deprecated
184 # in favor of name more related to its intended functionality.
185 #
186 prestarttests: prestarttests_msg shortsleep unittests
187
188 prestarttests_msg: FORCE
189         @$(ECHO) "=============================================================================="
190         @$(ECHO) "TestMakefile: The \"prestarttests\" rule is being deprecated."
191         @$(ECHO) "              Use \"make testusage\" for a description of the usage model."   
192         @$(ECHO) "              The equivalent new rule is \"unittests\"."
193         @$(ECHO) "              Invoking the \"unittests\" rule now."
194         @$(ECHO) "=============================================================================="
195
196 ####################
197 #
198 # poststarttests is being deprecated since it multiply defines a
199 # recursive make rule leading to ambuguity and confusion.
200 #
201 poststarttests: poststarttests_msg shortsleep servertests
202
203 poststarttests_msg: FORCE
204         @$(ECHO) "==============================================================================="
205         @$(ECHO) "TestMakefile: The \"posstarttests\" rule is being deprecated.."
206         @$(ECHO) "              Use \"make testusage\" for a description of the usage model."   
207         @$(ECHO) "              The equivalent new rule is \"servertests\"."
208         @$(ECHO) "              Invoking the \"servertests\" rule now."
209         @$(ECHO) "==============================================================================="
210
211 #####################
212 #
213 # tests is being deprecated since it multiply defines a
214 # recursive make rule leading to ambuguity and confusion.
215 #
216 tests: tests_msg shortsleep alltests
217
218 tests_msg: FORCE
219         @$(ECHO) "==================================================================="
220         @$(ECHO) "TestMakefile: The \"tests\" rule is being deprecated."
221         @$(ECHO) "              Use \"make testusage\" for a description of the usage model."   
222         @$(ECHO) "              The equivalent new rule is \"alltests\"."
223         @$(ECHO) "              Invoking the \"alltests\" rule now."
224         @$(ECHO) "==================================================================="
225
226
227 shortsleep: FORCE
228         @$(SLEEP) 5
229
230 ####################
231 #
232 # unittests
233 #
234 unittests: FORCE
235         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile tests
236         @ $(ECHO) "+++++ TestMakefile unittests complete"
237
238 #####################
239 #
240 # servertests
241 #
242
243 servertestsclean: FORCE
244         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
245         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Pegasus/CQL/tests/Queries -f Makefile clean
246         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Pegasus/Query/QueryExpression/tests/Queries -f Makefile clean
247         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile clean
248
249 servertestssetup: FORCE
250 ifdef PEGASUS_HAS_SSL
251 #
252 # The association between user names and certificates is stored in the
253 # repository.  If the repository is recreated, we also need to re-initialize
254 # the trust store directories. Otherwise, the truststore content will be
255 # out-of-sync with the mapping stored in the repository.
256 #
257 #  NOTE: Tests that require their own test namespaces to run poststarttests
258 #  should add their namespace creation make commands to pegasus/Makefile
259 #  under the testrepository tag.
260 #
261         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile removeSSLTrustDirectories
262         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile createSSLTrustDirectories
263 endif
264         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
265         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
266         @$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile \
267             cleanupCBATestCertificates
268         @$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile \
269             setupCBATestCertificates
270         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile cimstart
271         $(SLEEP) 5
272         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile ConfigureUsers
273         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile Create_SSL_Certificate
274 ifeq ($(PEGASUS_TEST_SDK),true)
275         $(MAKE) --directory=$(PEGASUS_ROOT)/src/SDK/samples -f Makefile setupSDK
276 endif
277         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile cimstop
278
279 # slptests are run under separate target because these testcases require that
280 # both the cimserver and SLP are running. There is no need for special options
281 # while starting cimserver.
282 slptests:
283         $(MAKE) --directory=$(PEGASUS_ROOT)/src/slp/tests/slptests -f Makefile slptests
284         @ $(ECHO) "+++++ TestMakefile slp test suite completed"
285
286 servertests: servertestsclean servertestssetup serversuite
287         @ $(ECHO) "+++++ TestMakefile servertests suites complete"
288
289 serversuite: FORCE
290         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Pegasus/Server/tests -f Makefile commandtests
291         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile cimstart
292         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests
293         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestBinRepository
294         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_Cimsub_InterOp
295         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOP_TS1
296         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_IndInit_TS1
297         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOPProvFail_TS1
298         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOPProvFail_TS2
299         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOPProvFail_TS3
300         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_INDSSL_TS1
301         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_SSL_IPV4_TS1
302         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_SSL_IPV6_TS1
303         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_SSL_CBA_TS1
304         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_G11N_TS1
305         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile runCBATestSuites
306         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_SDK_TS1
307         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_ExportClientSSL_TS1
308         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_Cimserver_Availability
309 ifeq ($(PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER),true)
310         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_Cmpi_Sub
311 endif
312         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_idleConnectionTimeout1
313         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_idleConnectionTimeout2
314
315 #####################
316 #
317 # stresstests
318 #
319 stresstests:
320         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_STRESS_TS1
321
322 ####################
323 #
324 # perftests - simple performance test until we have better
325 #
326 # - Turns statistics on (uses TestInterop until we have better)
327 # - runs poststarttests suite and TestBenchmark
328 # - runs cimperf to displat the statistics
329 # - turns statistics off
330 #
331 perftests: servertestsclean servertestssetup perfsuite
332
333 perfsuite: FORCE
334         $(PEGASUS_HOME)/bin/TestInterop on
335         $(TIME_CMD) $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests
336         @ $(ECHO) " "
337         $(TIME_CMD) $(PEGASUS_HOME)/bin/TestClient
338         @ $(ECHO) " "
339         $(TIME_CMD) $(PEGASUS_HOME)/bin/TestBenchmark
340         @ $(ECHO) " "
341         @ $(ECHO) " "
342         $(TIME_CMD) $(PEGASUS_HOME)/bin/cimperf
343         @ $(ECHO) " "
344         $(PEGASUS_HOME)/bin/TestInterop off
345
346
347 ####################
348 #
349 # alltests
350 #
351 alltests: unittests servertests
352 ifeq ($(OS_TYPE),windows)
353         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
354         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile uninstall
355 endif
356         @ $(ECHO) "+++++ TestMakefile alltests Complete"
357
358 ###############################################################################
359 ##  Test Suite Definitions
360 ###############################################################################
361
362 ###############################################################################
363 ##  OOP Test Suite 1: "Out-of-Process"(OOP) Provider Tests
364 ##
365 ##  Configuration Options: forceProviderProcesses=true
366 ##
367 ##  If PEGASUS_DEFAULT_ENABLE_OOP is set, then tests are run with OOP disabled
368 ##  since tests have already been run with OOP enabled.
369 ##
370 ##
371 ###############################################################################
372 ifeq ($(PEGASUS_DEFAULT_ENABLE_OOP),true)
373 OOP_TS1_CONFIG_OPTIONS = forceProviderProcesses=false
374 else
375 OOP_TS1_CONFIG_OPTIONS = forceProviderProcesses=true
376 endif
377
378 ifeq ($(PEGASUS_ENABLE_PRIVILEGE_SEPARATION),true)
379     # When privilege separation is enabled, most providers run out of process
380     # regardless of the forceProviderProcesses setting.  The exception is
381     # providers that register with UserContext = 5 (CIM Server).  The only
382     # case of this in the automated tests is the UserContextTestProvider.
383     OOP_TS1_TEST_CMDS = \
384         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/UserContextTestProvider/testclient@@poststarttests
385 else
386     OOP_TS1_TEST_CMDS = \
387         $(MAKE)@@--directory=$(PEGASUS_ROOT)@@-f@@Makefile@@poststarttests
388 endif
389
390 run_OOP_TS1:
391         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
392             CIMSERVER_CONFIG_OPTIONS="$(OOP_TS1_CONFIG_OPTIONS)" \
393             TESTSUITE_CMDS="$(OOP_TS1_TEST_CMDS)"
394
395 ###############################################################################
396
397 ###############################################################################
398 ##  IndInit Test Suite 1: IndicationService Initialization Tests
399 ##
400 ##  Configuration Options: (none)
401 ##
402 ###############################################################################
403 IndInit_TS1_CONFIG_OPTIONS =
404 IndInit_TS1a_TEST_CMDS = \
405         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Pegasus/IndicationService/tests/ProcessIndication@@IndInit_TS1a
406 IndInit_TS1b_TEST_CMDS = \
407         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Pegasus/IndicationService/tests/ProcessIndication@@IndInit_TS1b
408
409 run_IndInit_TS1:
410         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
411             CIMSERVER_CONFIG_OPTIONS="$(IndInit_TS1_CONFIG_OPTIONS)" \
412             TESTSUITE_CMDS="$(IndInit_TS1a_TEST_CMDS)"
413         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
414             CIMSERVER_CONFIG_OPTIONS="$(IndInit_TS1_CONFIG_OPTIONS)" \
415             TESTSUITE_CMDS="$(IndInit_TS1b_TEST_CMDS)"
416
417 ###############################################################################
418 ##  OOPProvFail Test Suite 1: OOP Provider Module Failure Tests
419 ##
420 ##  Configuration Options: forceProviderProcesses=true
421 ##  enableAuthentication=true, enableAuthentication=false
422 ##
423 ##  NOTE: Regardless of the setting of PEGASUS_DEFAULT_ENABLE_OOP, this test
424 ##  suite is always run with OOP enabled.  This test suite causes a provider to
425 ##  exit.  Running this test suite with OOP disabled would cause the cimserver
426 ##  to exit and the test suite to fail.
427 ##
428 ##  NOTE: The test is run once with authentication enabled, and once without
429 ##  authentication enabled.
430 ##
431 ###############################################################################
432 OOPProvFail_TS1a_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=true
433 OOPProvFail_TS1b_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=false
434 OOPProvFail_TS1_TEST_CMDS = \
435         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS1
436
437 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
438 run_OOPProvFail_TS1:
439         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
440             CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS1a_CONFIG_OPTIONS)" \
441             TESTSUITE_CMDS="$(OOPProvFail_TS1_TEST_CMDS)"
442         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
443             CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS1b_CONFIG_OPTIONS)" \
444             TESTSUITE_CMDS="$(OOPProvFail_TS1_TEST_CMDS)"
445 else
446 run_OOPProvFail_TS1: FORCE
447         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping run_OOPProvFail_TS1"
448 endif
449
450 ###############################################################################
451 ##  OOPProvFail Test Suite 2: OOP Provider Module Failure on IndicationService
452 ##                            Initialization Tests
453 ##
454 ##  Configuration Options: forceProviderProcesses=true
455 ##                         enableAuthentication=true
456 ##
457 ##  NOTE: Regardless of the setting of PEGASUS_DEFAULT_ENABLE_OOP, this test
458 ##  suite is always run with OOP enabled.  This test suite causes a provider to
459 ##  exit.  Running this test suite with OOP disabled would cause the cimserver
460 ##  to exit and the test suite to fail.
461 ##
462 ###############################################################################
463 OOPProvFail_TS2_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=true
464 OOPProvFail_TS2a_TEST_CMDS = \
465         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS2a
466 OOPProvFail_TS2b_TEST_CMDS = \
467         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS2b
468
469 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
470 run_OOPProvFail_TS2:
471         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
472             CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS2_CONFIG_OPTIONS)" \
473             TESTSUITE_CMDS="$(OOPProvFail_TS2a_TEST_CMDS)"
474         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
475             CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS2_CONFIG_OPTIONS)" \
476             TESTSUITE_CMDS="$(OOPProvFail_TS2b_TEST_CMDS)"
477 else
478 run_OOPProvFail_TS2: FORCE
479         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping run_OOPProvFail_TS2"
480 endif
481
482 ###############################################################################
483 ##  OOPProvFail Test Suite 3: OOP Provider Module Failure CIM Server restart
484 ##                            Tests
485 ##
486 ##  Configuration Options: forceProviderProcesses=true
487 ##                         enableAuthentication=true
488 ##
489 ##  NOTE: Regardless of the setting of PEGASUS_DEFAULT_ENABLE_OOP, this test
490 ##  suite is always run with OOP enabled.  This test suite causes a provider to
491 ##  exit.  Running this test suite with OOP disabled would cause the cimserver
492 ##  to exit and the test suite to fail.
493 ##
494 ###############################################################################
495 OOPProvFail_TS3_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=true
496 OOPProvFail_TS3a_TEST_CMDS = \
497         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS3a
498 OOPProvFail_TS3b_TEST_CMDS = \
499         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS3b
500
501 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
502 run_OOPProvFail_TS3:
503         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
504             CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS3_CONFIG_OPTIONS)" \
505             TESTSUITE_CMDS="$(OOPProvFail_TS3a_TEST_CMDS)"
506         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
507             CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS3_CONFIG_OPTIONS)" \
508             TESTSUITE_CMDS="$(OOPProvFail_TS3b_TEST_CMDS)"
509 else
510 run_OOPProvFail_TS3: FORCE
511         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping run_OOPProvFail_TS3"
512 endif
513
514 ###############################################################################
515 ##  Indication SSL Test Suite 1: Indication Testing over HTTPS
516 ##
517 ##  Configuration Options: (none)
518 ##
519 ###############################################################################
520 INDSSL_TS1a_CONFIG_OPTIONS = enableHttpsConnection=true enableAuthentication=false
521 INDSSL_TS1a_TEST_CMDS = \
522         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/IndicationStressTestProvider/testclient@@-f@@Makefile@@run_TS1_AuthenticationDisabled
523
524 INDSSL_TS1b_CONFIG_OPTIONS = enableHttpsConnection=true enableAuthentication=true sslClientVerificationMode=required
525 INDSSL_TS1b_TEST_CMDS = \
526         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/IndicationStressTestProvider/testclient@@-f@@Makefile@@run_TS1_AuthenticationEnabled
527
528
529 ifdef PEGASUS_HAS_SSL
530 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
531 run_INDSSL_TS1: EnableUsers Create_SSL_Certificate_ignore
532         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
533             CIMSERVER_CONFIG_OPTIONS="$(INDSSL_TS1a_CONFIG_OPTIONS)" \
534             TESTSUITE_CMDS="$(INDSSL_TS1a_TEST_CMDS)"
535         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
536             CIMSERVER_CONFIG_OPTIONS="$(INDSSL_TS1b_CONFIG_OPTIONS)" \
537             TESTSUITE_CMDS="$(INDSSL_TS1b_TEST_CMDS)"
538 else
539 run_INDSSL_TS1: FORCE
540         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping run_INDSSL_TS1"     
541 endif
542 else
543 run_INDSSL_TS1: FORCE
544         @ $(ECHO) "+++++ PEGASUS_HAS_SSL not defined: Skipping run_INDSSL_TS1"
545 endif
546
547
548 ###############################################################################
549
550 ###############################################################################
551 ##  SSL IPv4 Test Suite : Tests SSL connections for IPv4
552 ##
553 ##  Configuration Options: enableHttpsConnection=true
554 ##  NOTE : Authentication is not enabled as we are only verifying
555 ##         if SSL based IPv6 connections are working correctly. The osinfo
556 ##         client requires a password to be passed for a remote connection
557 ##         otherwise it will prompt for one. As a work around,
558 ##         we are providing a dummy password.
559 ##
560 ###############################################################################
561 SSL_IPV4_TS1_CONFIG_OPTIONS = enableHttpsConnection=true \
562       enableAuthentication=false
563 SSL_IPV4_TS1_CMD_1 = \
564         osinfo -s -w notapassword -h 127.0.0.1 -p 5989
565 SSL_IPV4_TS1_CMD_2 = \
566         osinfo -s -w notapassword -h localhost -p 5989
567
568 ifdef PEGASUS_HAS_SSL
569     run_SSL_IPV4_TS1: FORCE
570         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
571             CIMSERVER_CONFIG_OPTIONS="$(SSL_IPV4_TS1_CONFIG_OPTIONS)" \
572             TESTSUITE_CMDS="$(SSL_IPV4_TS1_CMD_1)"
573         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
574             CIMSERVER_CONFIG_OPTIONS="$(SSL_IPV4_TS1_CONFIG_OPTIONS)" \
575             TESTSUITE_CMDS="$(SSL_IPV4_TS1_CMD_2)"
576 else
577     run_SSL_IPV4_TS1: FORCE
578         @ $(ECHO) "+++++ PEGASUS_HAS_SSL not defined: Skipping run_SSL_IPV4_TS1"
579 endif
580
581 ###############################################################################
582 ##  SSL IPv6 Test Suite : Tests SSL connections for IPv6
583 ##
584 ##  Configuration Options: enableHttpsConnection=true
585 ##  NOTE : Authentication is not enabled as we are only verifying
586 ##         if SSL based IPv6 connections are working correctly. The osinfo
587 ##         client requires a password to be passed for a remote connection
588 ##         otherwise it will prompt for one. As a work around,
589 ##         we are providing a dummy password.
590 ##
591 ##         The IPv4-mapped IPv6 address test is only enabled for unix
592 ##         platforms as Windows does not support IPv4-mapped IPv6 addresses
593 ##         on certain versions.
594 ##
595 ###############################################################################
596 SSL_IPV6_TS1_CONFIG_OPTIONS = enableHttpsConnection=true \
597       enableAuthentication=false
598 SSL_IPV6_TS1_CMD_1 = \
599         osinfo -s -w notapassword -h ::1 -p 5989
600 SSL_IPV6_TS1_CMD_2 = \
601         osinfo -s -w notapassword -h ::ffff:127.0.0.1 -p 5989
602
603 ifdef PEGASUS_HAS_SSL
604     run_SSL_IPV6_TS1: FORCE
605     ifeq ($(PEGASUS_TEST_IPV6), true)
606         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
607             CIMSERVER_CONFIG_OPTIONS="$(SSL_IPV6_TS1_CONFIG_OPTIONS)" \
608             TESTSUITE_CMDS="$(SSL_IPV6_TS1_CMD_1)"
609       ifeq ($(OS_TYPE), unix)
610         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
611             CIMSERVER_CONFIG_OPTIONS="$(SSL_IPV6_TS1_CONFIG_OPTIONS)" \
612             TESTSUITE_CMDS="$(SSL_IPV6_TS1_CMD_2)"
613       endif
614     else
615         @ $(ECHO) "+++++ PEGASUS_TEST_IPV6 not defined: Skipping run_SSL_IPV6_TS1"
616     endif
617 else
618     run_SSL_IPV6_TS1: FORCE
619         @ $(ECHO) "+++++ PEGASUS_HAS_SSL not defined: Skipping run_SSL_IPV6_TS1"
620 endif
621
622 ###############################################################################
623 ##  CBA SSL Test Suite 1: Certificate based authentication Tests
624 ##
625 ##  Configuration Options: enableAuthentication=true
626 ##                         enableHttpsConnection=true
627 ##                         sslClientVerificationMode=optional
628 ##                         sslTrustStoreUserName=$(CURRENT_USER)
629 ##
630 ###############################################################################
631 SSL_CBA_TS1_CONFIG_OPTIONS = enableHttpsConnection=true enableAuthentication=true \
632        sslClientVerificationMode=optional sslTrustStoreUserName=$(CURRENT_USER)
633 SSL_CBA_TS1_TEST_CMD_1 = \
634        $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Clients/cimtrust/tests@@SSLCertificateTest1
635 SSL_CBA_TS1_TEST_CMD_2 = \
636        $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Clients/cimcrl/tests@@SSLCRLTest1
637
638 ifdef PEGASUS_HAS_SSL
639 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
640 run_SSL_CBA_TS1: FORCE
641         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
642             CIMSERVER_CONFIG_OPTIONS="$(SSL_CBA_TS1_CONFIG_OPTIONS)" \
643             TESTSUITE_CMDS="$(SSL_CBA_TS1_TEST_CMD_1)"
644         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
645             CIMSERVER_CONFIG_OPTIONS="$(SSL_CBA_TS1_CONFIG_OPTIONS)" \
646             TESTSUITE_CMDS="$(SSL_CBA_TS1_TEST_CMD_2)"
647 else
648 run_SSL_CBA_TS1: FORCE
649         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping run_SSL_CBA_TS1"    
650 endif
651 else
652 run_SSL_CBA_TS1: FORCE
653         @ $(ECHO) "+++++ PEGASUS_HAS_SSL not defined: Skipping run_SSL_CBA_TS1"
654
655 endif
656
657 ############################################################################
658 #
659 # Create_SSL_Certificate
660 #
661 # create a certificate that can be used for certification testing.
662 # It is currently used by the following tests:
663 #            -run_INDSSL_TS1
664 #
665 Create_SSL_Certificate_ignore: FORCE
666         -$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile Create_SSL_Certificate
667
668 Create_SSL_Certificate: FORCE
669 ifdef PEGASUS_HAS_SSL
670 ifdef PEGASUS_TEST_USER_DEFINED
671         $(ECHO) "Creating SSL certificate for test"
672         cimtrust -a -U $(PEGASUS_TEST_USER_ID) -f $(PEGASUS_HOME)/server.pem -Ts
673 endif
674 else
675         $(ECHO) "PEGASUS_HAS_SSL not defined - Not Creating SSL certificate for test"
676 endif
677
678 ###############################################################################
679 ##  G11N Test Suite 1: Globalization Tests
680 ##
681 ##  Configuration Options: forceProviderProcesses=false
682 ##
683 ###############################################################################
684 G11N_TS1_CONFIG_OPTIONS = forceProviderProcesses=false
685 G11N_TS1_TEST_CMDS = \
686         $(MAKE) --directory $(PEGASUS_ROOT)/src/Clients/g11ntest \
687             -f Makefile g11ntest
688
689 run_G11N_TS1:
690         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
691             CIMSERVER_CONFIG_OPTIONS="$(G11N_TS1_CONFIG_OPTIONS)" \
692             TESTSUITE_CMDS="$(G11N_TS1_TEST_CMDS)"
693
694 ###############################################################################
695 ##  Stress Test Suite 1:  Default Stress Tests
696 ##
697 ##  Configuration Options: (none)
698 ##
699 ###############################################################################
700 STRESS_TS1_CONFIG_OPTIONS =
701 STRESS_TS1_TEST_CMDS = \
702         TestStressTestController
703
704 run_STRESS_TS1:
705         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
706             CIMSERVER_CONFIG_OPTIONS="$(STRESS_TS1_CONFIG_OPTIONS)" \
707             TESTSUITE_CMDS="$(STRESS_TS1_TEST_CMDS)"
708 ###############################################################################
709
710 ###############################################################################
711 ##  SDK Test Suite 1:  SDK Tests
712 ##
713 ##  Configuration Options: (none)
714 ##
715 ###############################################################################
716 SDK_TS1_CONFIG_OPTIONS =
717 SDK_TS1_TEST_CMDS = \
718         $(MAKE) --directory $(PEGASUS_ROOT)/src/SDK/samples \
719             -f Makefile testSDK
720
721 ifeq ($(PEGASUS_TEST_SDK),true)
722 run_SDK_TS1: FORCE
723         $(MAKE) --directory=$(PEGASUS_ROOT)/mak \
724             -f $(PEGASUS_ROOT)/mak/SDKMakefile stageINCLUDE \
725             PEGASUS_STAGING_DIR=$(PEGASUS_HOME) \
726             PEGASUS_INCLUDE_DIR=/include
727         $(MAKE) --directory=$(PEGASUS_ROOT)/src/SDK/samples \
728             -f Makefile clean
729         $(MAKE) --directory=$(PEGASUS_ROOT)/src/SDK/samples \
730             -f Makefile PEGASUS_INCLUDE_DIR=$(PEGASUS_HOME)/include
731         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
732             CIMSERVER_CONFIG_OPTIONS="$(SDK_TS1_CONFIG_OPTIONS)" \
733             TESTSUITE_CMDS="$(SDK_TS1_TEST_CMDS)"
734 else
735 run_SDK_TS1: FORCE
736         @ $(ECHO) "+++++ PEGASUS_TEST_SDK is not true: Skipping run_SDK_TS1"    
737 endif
738 ###############################################################################
739
740 ###############################################################################
741 ##  Export Client SSL Test Suite 1:
742 ##
743 ##  Configuration Options: enableHttpsConnection=true
744 ##
745 ###############################################################################
746 ExportClientSSL_TS1_CONFIG_OPTIONS = enableHttpsConnection=true
747 ExportClientSSL_TS1_TEST_CMDS = \
748         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Pegasus/ExportClient/tests/ExportClient@@-f@@Makefile@@runExportClientSSL_TS1
749
750 ifdef PEGASUS_HAS_SSL
751 run_ExportClientSSL_TS1:
752         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
753             CIMSERVER_CONFIG_OPTIONS="$(ExportClientSSL_TS1_CONFIG_OPTIONS)" \
754             TESTSUITE_CMDS="$(ExportClientSSL_TS1_TEST_CMDS)"
755 else
756 run_ExportClientSSL_TS1: FORCE
757         @ $(ECHO) "+++++ PEGASUS_HAS_SSL not defined: Skipping run_ExportClientSSL_TS1"
758 endif
759
760 ###############################################################################
761
762
763
764 ###############################################################################
765 ##  idleConnectionTimeout Test Suite 1:  uses ChunkingStressProvider Tests
766 ##
767 ##  Configuration Options: idleConnectionTime=55
768 ##
769 ###############################################################################
770 IDLE_CONNECTION_TIMEOUT_1_CONFIG_OPTIONS = idleConnectionTimeout=55
771 IDLE_CONNECTION_TIMEOUT_1_TEST_CMDS = \
772         $(MAKE)@@--directory \
773             $(PEGASUS_ROOT)/src/Providers/TestProviders/ChunkingStressProvider/testclient \
774             -f@@Makefile@@poststarttests
775 run_idleConnectionTimeout1: FORCE
776         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
777             CIMSERVER_CONFIG_OPTIONS="$(IDLE_CONNECTION_TIMEOUT_1_CONFIG_OPTIONS)" \
778             TESTSUITE_CMDS="$(IDLE_CONNECTION_TIMEOUT_1_TEST_CMDS)"
779 ###############################################################################
780
781 ###############################################################################
782 ##  idleConnectionTimeout Test Suite 2:  uses IdleConnectionTimeout client test
783 ##
784 ##  Configuration Options: idleConnectionTime=6
785 ##
786 ###############################################################################
787 IDLE_CONNECTION_TIMEOUT_2_CONFIG_OPTIONS = idleConnectionTimeout=6
788 IDLE_CONNECTION_TIMEOUT_2_TEST_CMDS = \
789         $(MAKE)@@--directory \
790             $(PEGASUS_ROOT)/src/Pegasus/Client/tests/IdleConnectionTimeout/ \
791             -f@@Makefile@@timeoutTest@@IDLETIME=10
792 run_idleConnectionTimeout2: FORCE
793         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
794             CIMSERVER_CONFIG_OPTIONS="$(IDLE_CONNECTION_TIMEOUT_2_CONFIG_OPTIONS)" \
795             TESTSUITE_CMDS="$(IDLE_CONNECTION_TIMEOUT_2_TEST_CMDS)"
796 ###############################################################################
797
798 ###############################################################################
799 ##  cimserver thread limit test:
800 ##
801 ##  Configuration Options: none
802 ##
803 ###############################################################################
804 CIMSERVER_THREAD_LIMIT_TEST_CONFIG_OPTIONS = forceProviderProcesses=true
805 CIMSERVER_THREAD_LIMIT_TEST_CMDS = \
806        $(MAKE)@@--directory \
807             $(PEGASUS_ROOT)/src/Providers/TestProviders/FaultyInstanceProvider/testclient \
808             -f@@Makefile@@runAvailabilityTest
809 run_Cimserver_Availability: FORCE
810         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
811             CIMSERVER_CONFIG_OPTIONS="$(CIMSERVER_THREAD_LIMIT_TEST_CONFIG_OPTIONS)" \
812             TESTSUITE_CMDS="$(CIMSERVER_THREAD_LIMIT_TEST_CMDS)"
813 ###############################################################################
814
815 ###############################################################################
816 ##  cimsub CLI Test Suite 1:  PG_InterOp Tests
817 ##
818 ##  Configuration Options: (none)
819 ##
820 ###############################################################################
821 CIMSUB_INTEROP_CONFIG_OPTIONS =
822 CIMSUB_INTEROP_TEST_CMDS = \
823         $(MAKE) --directory \
824             $(PEGASUS_ROOT)/src/Clients/cimsub/tests/testscriptInterOp \
825             -f Makefile cimsubTest_InterOp
826 run_Cimsub_InterOp: FORCE
827         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
828             CIMSERVER_CONFIG_OPTIONS="$(CIMSUB_INTEROP_CONFIG_OPTIONS)" \
829             TESTSUITE_CMDS="$(CIMSUB_INTEROP_TEST_CMDS)"
830 ###############################################################################
831
832 ###############################################################################
833 ## CMPI subscription activation Test Suite 1:
834 ##
835 ## Configuration Options: (none)
836 ##
837 ###############################################################################
838 CMPI_SUB_TEST_CONFIG_OPTIONS=
839 CMPI_SUBa_TEST_CMDS = \
840         TestIndicationStressTest TestCMPI_IndicationStressTestClass test/TestProvider setup WQL
841 CMPI_SUBb_TEST_CMDS = \
842         TestIndicationStressTest TestCMPI_IndicationStressTestClass test/TestProvider getSubscriptionCount
843 CMPI_SUBc_TEST_CMDS =  \
844         TestIndicationStressTest TestCMPI_IndicationStressTestClass test/TestProvider cleanup
845 run_Cmpi_Sub: FORCE
846         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
847             CIMSERVER_CONFIG_OPTIONS="$(CMPI_SUB_TEST_CONFIG_OPTIONS)" \
848             TESTSUITE_CMDS="$(CMPI_SUBa_TEST_CMDS)"
849         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
850             CIMSERVER_CONFIG_OPTIONS="$(CMPI_SUB_TEST_CONFIG_OPTIONS)" \
851             TESTSUITE_CMDS="$(CMPI_SUBb_TEST_CMDS)"
852         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
853             CIMSERVER_CONFIG_OPTIONS="$(CMPI_SUB_TEST_CONFIG_OPTIONS)" \
854             TESTSUITE_CMDS="$(CMPI_SUBc_TEST_CMDS)"
855
856 ##############################################################################
857
858
859 ##############################################################################
860 ##
861 ## TestXMLRepository rule is used to run the poststarttests suite on
862 ## the XML Repository built using cimmofl
863 ##
864 ## TestXMLRepositoryServer rule is used to run the poststarttests suite on
865 ## the XML Repository built using cimmof
866 ##
867 ## TestXMLCmpRepository rule is used to run the poststarttest suite on
868 ## the XML Compressed Repository built using cimmofl
869 ##
870
871 ############################
872 ##
873 ## TestXMLRepository
874 ##
875
876 TestXMLRepository: TestXMLClean TestXMLBuildRepo  TestXMLRepo
877         @ $(ECHO) TestXMLRepository +++++ passed all test
878
879 ############################
880 ##
881 ## TestXMLRepositoryServer
882 ##
883 TestXMLRepositoryServer: TestXMLClean  TestXMLBuildRepoServ TestXMLRepo
884         @ $(ECHO) TestXMLRepositoryServer +++++ passed all test
885
886 ############################
887 ##
888 ## TestXMLCmpRepository -  run poststarttest on Compressed BIN Repository
889 ##
890 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY
891 TestXMLCmpRepository: FORCE
892         @ $(ECHO) TestXMLCmpRepository +++++ Repository compressed by default - nothing more to test.
893         @ $(ECHO) TestXMLCmpRepository +++++ passed all test
894 else
895
896 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST
897
898 TestXMLCmpRepository: TestXMLClean  TestCmpBuild TestXMLBuildRepo TestXMLRepo TestRegBuild
899         @ $(ECHO) TestXMLCmpRepository +++++ passed all test
900 else
901 TestXMLCmpRepository: FORCE
902         @ $(ECHO) TestXMLCmpRepository +++++ Not tested
903         @ $(ECHO) TestXMLCmpRepository +++++ refer to readme.compressed_repository
904         @ $(ECHO) TestXMLCmpRepository +++++ to enable: set PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST=true
905 endif
906 endif
907
908 ###########################
909 ##
910 ## TestXMLClean
911 ##
912 TestXMLClean: FORCE
913         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
914         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryclean REPOSITORY_NAME=repository_xml
915
916
917 ###########################
918 ##
919 ## TestXMLStartServer
920 ##
921 TestXMLStartServer: FORCE
922         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run
923         - $(MKDIRHIER) $(PEGASUS_HOME)/repository_xml
924         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="repositoryDir=$(PEGASUS_HOME)/repository_xml"
925         $(SLEEP) 5
926
927 ####
928 #### The following caused the cimserver to fail on startup
929 ####
930 ####    $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="enableBinRepository=false repositoryDir=$(PEGASUS_HOME)/repository_xml"
931
932 ###########################
933 ##
934 ## TestXMLBuildRepo
935 ##
936 TestXMLBuildRepo: FORCE
937         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
938         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
939
940
941 ###########################
942 ##
943 ## TestXMLBuildRepoServ
944 ##
945 TestXMLBuildRepoServ: TestXMLStartServer
946         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
947         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
948         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
949
950
951 ###########################
952 ##
953 ## TestXMLRepo
954 ##
955 TestXMLRepo: servertestsclean
956         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestXMLStartServer
957         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
958         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
959
960
961
962
963
964
965 ##############################################################################
966 ##
967 ## TestBinRepository rule is used to run the poststarttests suite on
968 ## the Binary Repository built using cimmofl
969 ##
970 ## TestBinRepositoryServer rule is used to run the poststarttests suite on
971 ## the Binary Repository built using cimmof
972 ##
973 ## TestBinCmpRepository rule is used to run the poststarttest suite on
974 ## the Binry Compressed Repository built using cimmofl
975 ##
976
977 ############################
978 ##
979 ## TestBinRepository
980 ##
981 ### bug 3011 disabled Binary Repository testing on LINUX_IA64 to allow
982 ### the nightly tests to run
983
984 TestBinRepository: TestBinClean TestBinBuildRepo  TestBinRepo
985         @ $(ECHO) TestBinRepository +++++ passed all test
986
987
988 ############################
989 ##
990 ## TestBinRepositoryServer
991 ##
992 TestBinRepositoryServer: TestBinClean  TestBinBuildRepoServ TestBinRepo
993         @ $(ECHO) TestBinRepositoryServer +++++ passed all test
994
995 ############################
996 ##
997 ## TestBinCmpRepository -  run poststarttest on Compressed BIN Repository
998 ##
999 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY
1000 TestBinCmpRepository: FORCE
1001         @ $(ECHO) TestBinCmpRepository +++++ Repository compressed by default - nothing more to test.
1002         @ $(ECHO) TestBinCmpRepository +++++ passed all test
1003 else
1004
1005 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST
1006
1007 TestBinCmpRepository: TestBinClean  TestCmpBuild TestBinBuildRepo TestBinRepo TestRegBuild
1008         @ $(ECHO) TestBinCmpRepository +++++ passed all test
1009 else
1010 TestBinCmpRepository: FORCE
1011         @ $(ECHO) TestBinCmpRepository +++++ Not tested
1012         @ $(ECHO) TestBinCmpRepository +++++ refer to readme.compressed_repository
1013         @ $(ECHO) TestBinCmpRepository +++++ to enable: set PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST=true
1014 endif
1015 endif
1016
1017
1018 ###########################
1019 ##
1020 ## TestBinClean
1021 ##
1022 TestBinClean: FORCE
1023         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1024         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryclean REPOSITORY_NAME=repository_bin
1025
1026
1027 ###########################
1028 ##
1029 ## TestBinStartServer
1030 ##
1031 TestBinStartServer: FORCE
1032         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run
1033         - $(MKDIRHIER) $(PEGASUS_HOME)/repository_bin
1034         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="enableBinaryRepository=true repositoryDir=$(PEGASUS_HOME)/repository_bin"
1035         $(SLEEP) 5
1036
1037 ###########################
1038 ##
1039 ## TestBinBuildRepo
1040 ##
1041 TestBinBuildRepo: FORCE
1042         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
1043         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
1044
1045
1046 ###########################
1047 ##
1048 ## TestBinBuildRepoServ
1049 ##
1050 TestBinBuildRepoServ: TestBinStartServer
1051         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
1052         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
1053         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1054
1055
1056 ###########################
1057 ##
1058 ## TestBinRepo
1059 ##
1060 TestBinRepo: servertestsclean
1061         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestBinStartServer
1062         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
1063         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1064
1065
1066
1067
1068 ############################
1069 ##
1070 ## TestCmpBuild - used to compile the repository for compression
1071 ##
1072 TestCmpBuild: FORCE
1073         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository clean
1074         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository depend PEGASUS_ENABLE_COMPRESSED_REPOSITORY=1
1075         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository PEGASUS_ENABLE_COMPRESSED_REPOSITORY=1
1076
1077
1078 ############################
1079 ##
1080 ## TestRegBuild - used to compile the repository for no compression
1081 ##
1082 TestRegBuild: FORCE
1083         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository clean
1084         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository depend
1085         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository
1086
1087
1088 ###############################################################################
1089 ##
1090 ## Trace Configuration
1091 ##
1092 ## Options: see usagetrace rule
1093 ##
1094 ###############################################################################
1095
1096 usagetrace: FORCE
1097         $(USAGE)
1098         $(USAGE)"TestMakefile Trace Commands: "
1099         $(USAGE)"  The cimserver must be running when using W=c which is the default for W"
1100         $(USAGE)
1101         $(USAGE)" traceon  W=[current/planned(c,p):   Enables all tracing."
1102         $(USAGE)" traceoff W=[current/planned(c,p):   Disables all tracing."
1103         $(USAGE)" tracesettings:                      Displays all trace settings."
1104         $(USAGE)" tracecomp:                          Displays a trace componenets list."
1105         $(USAGE)" traceon-CL C=[comp] L=[level(1,2,3,4)] W=[current/planned(c,p): "
1106         $(USAGE)"                           Enables tracing on component C at trace level L."
1107         $(USAGE)
1108         $(USAGE)" W defaults to c in the above commands where W can be specified"
1109         $(USAGE)
1110         $(USAGE)"  Usage examples:"
1111         $(USAGE)"   traceon       turns on trace in current server config"
1112         $(USAGE)"   traceon W=c   turns on trace in current server config"
1113         $(USAGE)"   traceon W=p   turns on trace in planned server config"
1114         $(USAGE)"   traceoff      turns on trace in current server config"
1115         $(USAGE)"   traceoff W=c  turns on trace in current server config"
1116         $(USAGE)"   traceoff W=p  turns on trace in planned server config"
1117         $(USAGE)
1118         $(USAGE)"   traceon-CL C=DiscardedData L=3 W=c"
1119         $(USAGE)"     Turns on trace for DiscardedData at level 3 in current server config"
1120         $(USAGE)"   traceon-CL C=DiscardedData L=3 W=p"
1121         $(USAGE)"     Turns on trace for DiscardedData at level 3 in planned server config"
1122         $(USAGE)
1123         $(USAGE)
1124
1125 traceon: FORCE
1126         @ cimconfig -s traceComponents=ALL -$W
1127         @ cimconfig -s traceLevel=3 -$W
1128         $(MAKE) -f $(ROOT)/TestMakefile tracesettings
1129
1130
1131 traceoff: FORCE
1132         @ cimconfig -s traceComponents=  -$W
1133         $(MAKE) -f $(ROOT)/TestMakefile tracesettings
1134
1135
1136 tracesettings: FORCE
1137         @ $(ECHO) " "
1138         cimconfig -g traceComponents -c -p
1139         @ $(ECHO) " "
1140         cimconfig -g traceLevel -c -p
1141         @ $(ECHO) " "
1142         cimconfig -g traceFilePath -c -p
1143         @ $(ECHO) " "
1144
1145 traceon-CL: FORCE
1146         @ cimconfig -s traceComponents=$C -$W
1147         @ cimconfig -s traceLevel=$L -$W
1148         $(MAKE) -f $(ROOT)/TestMakefile tracesettings
1149
1150 tracecomp: FORCE
1151         $(USAGE)
1152         $(USAGE)"Trace component list:"
1153         $(USAGE)
1154         $(USAGE)"Channel"
1155         $(USAGE)"XmlParser"
1156         $(USAGE)"XmlWriter"
1157         $(USAGE)"XmlReader"
1158         $(USAGE)"XmlIO"
1159         $(USAGE)"Http"
1160         $(USAGE)"CimData"
1161         $(USAGE)"ProvManager"
1162         $(USAGE)"Repository"
1163         $(USAGE)"Dispatcher"
1164         $(USAGE)"OsAbstraction"
1165         $(USAGE)"Config"
1166         $(USAGE)"IndDelivery"
1167         $(USAGE)"IndHandler"
1168         $(USAGE)"Authentication"
1169         $(USAGE)"Authorization"
1170         $(USAGE)"UserManager"
1171         $(USAGE)"SubscriptionService"
1172         $(USAGE)"Registration"
1173         $(USAGE)"Shutdown"
1174         $(USAGE)"Server"
1175         $(USAGE)"IndicationService"
1176         $(USAGE)"IndicationServiceInternal"
1177         $(USAGE)"ConfigurationManager"
1178         $(USAGE)"MessageQueueService"
1179         $(USAGE)"ProviderManager"
1180         $(USAGE)"ObjectResolution"
1181         $(USAGE)"WQL"
1182         $(USAGE)"CQL"
1183         $(USAGE)"Thread"
1184         $(USAGE)"MetaDispatcher"
1185         $(USAGE)"IPC"
1186         $(USAGE)"IndicationHandlerService"
1187         $(USAGE)"CIMExportRequestDispatcher"
1188         $(USAGE)"Memory"
1189         $(USAGE)"SSL"
1190         $(USAGE)"ControlProvider"
1191         $(USAGE)"AsyncOpNode"
1192         $(USAGE)"CIMOMHandle"
1193         $(USAGE)"L10N"
1194         $(USAGE)"ExportClient"
1195         $(USAGE)"Listener"
1196         $(USAGE)"DiscardedData"
1197         $(USAGE)"ProviderAgent"
1198         $(USAGE)
1199
1200 ###############################################################################
1201 ##
1202 ## Trace Configuration - Old rules being deprecated
1203 ##
1204 ## Options:
1205 ##      XMLTraceOn: Enables XML request and response tracing.
1206 ##      ProviderLoadTraceOn: Enables Provider load tracing.
1207 ##      XML+ProviderLoadTraceOn: Enables both XML request/response and Provider
1208 ##                                 load tracing.
1209 ##      AllTraceOn: Enables all tracing.
1210 ##      AllTraceOff: Disables all tracing.
1211 ##      list: Lists trace settings.
1212 ##
1213 ###############################################################################
1214
1215 XMLTraceOn:
1216         cimconfig -s traceComponents=XmlIO -c
1217         cimconfig -s traceLevel=3 -c
1218         cimconfig -g traceComponents
1219         cimconfig -g traceLevel
1220
1221 ProviderLoadTraceOn:
1222         cimconfig -s traceComponents=ProvManager,OsAbstraction
1223         cimconfig -s traceLevel=3 -c
1224         cimconfig -g traceComponents
1225         cimconfig -g traceLevel
1226
1227 XML+ProviderLoadTraceOn:
1228         cimconfig -s traceComponents=XmlIO,ProvManager,OsAbstraction
1229         cimconfig -s traceLevel=3 -c
1230         cimconfig -g traceComponents
1231         cimconfig -g traceLevel
1232
1233 AllTraceOn: traceon
1234
1235 AllTraceOff: traceoff
1236
1237 list: tracesettings
1238
1239 #########################################################################
1240 # standardtests
1241 #
1242 # More testing options...
1243 #
1244 # The standard test seem to contain additional test that may not be able
1245 # to run on all platforms so they have been grouped here for now rather than
1246 # being included in the serversuite rule.
1247 #
1248 # The test are:
1249 #      TestCimmof
1250 #      TestNoSecurity
1251 #      TestLocalSecurity
1252 #      TestRemoteSecurity
1253 #      TestAuthorization
1254 #
1255 # NOTE: The TestsNoSecurity test is comprised of DisableSecurity and
1256 #       TestNoSecurity.
1257 #
1258 # NOTE: The TestNoSecurity step runs the servertests which builds the
1259 #       the repository that is then left in place for the remaining tests.
1260 #       The cimof test must be before the TestNosecurity step as it removes
1261 #       the repository builds a new one with cimmofl and another one with
1262 #       cimmof and then compares them.
1263 #
1264 # NOTE: The Authentication test is comprised of EnableAuthentication,
1265 #       TestLocalSecurity and TestRemoteSecurity.
1266 #
1267 # NOTE: The Authorization test is comprised of EnableAuthorization and
1268 #       TestAuthorization.
1269 #
1270 # NOTE: The EnableAuthentication and EnableAuthorization steps require
1271 #       root access. Pegasus doesn't currently have the infrastructure
1272 #       in place to run the server as root and run the test as non-root.
1273 #       Rather than run everything, server, tests, providers, clients etc.
1274 #       as root many testers prefer to run the tests as non-root. Setting
1275 #       PEGASUS_DISABLE_PRIVILEGED_TESTS in the environment helps to
1276 #       facilitate that.
1277 #
1278
1279 standardtests: FORCE
1280         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i DisableSecurity
1281         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestCimmof
1282 #       $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestNoSecurity
1283         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository testrepository
1284 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
1285         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile EnableAuthentication
1286         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestLocalSecurity
1287         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestRemoteSecurity
1288         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile EnableAuthorization
1289         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestAuthorization
1290 else
1291         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping EnableAuthentication, TestLocalSecurity, and TestRemoteSecurity "
1292         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping EnableAuthorization and TestAuthorization " 
1293 endif
1294         # Reset the security options to the defaults
1295         cimconfig -u enableNamespaceAuthorization -p
1296         cimconfig -u enableAuthentication -p
1297         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1298         @ $(ECHO) "+++++ TestMakefile standardtests complete"
1299
1300 TestNoSecurity:
1301         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile servertests
1302         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
1303         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile RunTestClientLocal
1304
1305 TestLocalSecurity:
1306         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile RunTestClientLocal
1307         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests HOSTNAME= PORT= USER= PASSWORD= SECURITY_ENABLED=true
1308
1309 TestRemoteSecurity:
1310         TestClient -user $(PEGASUS_TEST_USER_ID) -password $(PEGASUS_TEST_USER_PASS) $(system):5988
1311         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/static -f Makefile poststarttests HOSTNAME=-h$(system) USER=-u$(PEGASUS_TEST_USER_ID) PASSWORD=-w$(PEGASUS_TEST_USER_PASS) SECURITY_ENABLED=true
1312
1313 TestAuthorization:
1314         TestPegClientDeleteNamespace -a -user $(PEGASUS_TEST_USER_ID) -password $(PEGASUS_TEST_USER_PASS)
1315         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile RunTestClientLocal
1316         TestClient -user $(PEGASUS_TEST_USER_ID) -password $(PEGASUS_TEST_USER_PASS) $(system):5988
1317         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/static -f Makefile poststarttests HOSTNAME=-h$(system) USER=-u$(PEGASUS_TEST_USER_ID) PASSWORD=-w$(PEGASUS_TEST_USER_PASS) SECURITY_ENABLED=true
1318
1319 TestSubscriptions:
1320         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile DisableSecurity
1321         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
1322         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
1323         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
1324         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/cimv2/Subscription -f Makefile poststarttests
1325         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile cimstop
1326
1327 TestCimmof:
1328         # Build the repository with cimmofl and cimmof and compare them.
1329         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1330         -@$(MOVE) $(REPOSITORY_DIR)/repository $(REPOSITORY_DIR)/repository-save
1331         @$(RMREPOSITORY) $(REPOSITORY_DIR)/repository-cimmofl
1332         @$(RMREPOSITORY) $(REPOSITORY_DIR)/repository-cimmof
1333         @$(ECHO) $(CIM_SCHEMA_DIR)
1334         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
1335         @$(MOVE) $(REPOSITORY_DIR)/repository $(REPOSITORY_DIR)/repository-cimmofl
1336         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile cimstart
1337         @$(ECHO) $(CIM_SCHEMA_DIR)
1338         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer
1339         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile cimstop
1340         @$(MOVE) $(REPOSITORY_DIR)/repository $(REPOSITORY_DIR)/repository-cimmof
1341         -@$(MOVE) $(REPOSITORY_DIR)/repository-save $(REPOSITORY_DIR)/repository
1342         TestCompareRepositories $(REPOSITORY_DIR)/repository-cimmofl $(REPOSITORY_DIR)/repository-cimmof
1343         @$(RMREPOSITORY) $(REPOSITORY_DIR)/repository-cimmofl
1344         @$(RMREPOSITORY) $(REPOSITORY_DIR)/repository-cimmof
1345
1346 RunTestClientLocal:
1347         TestClient -local
1348
1349 DisableSecurity:
1350         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1351         cimconfig -s enableAuthentication=false -p
1352         cimconfig -s enableNamespaceAuthorization=false -p
1353
1354 EnableUsers:
1355         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1356         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
1357         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile ConfigureUsers
1358
1359 EnableAuthentication:
1360         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1361         cimconfig -s enableAuthentication=true -p
1362         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
1363         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile ConfigureUsers
1364
1365 EnableAuthorization:
1366         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1367         cimconfig -s enableNamespaceAuthorization=true -p
1368         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
1369         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i ConfigureAuthorizations
1370
1371 EnableSSL:
1372         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1373         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithSSL
1374
1375 #
1376 # ConfigureUsers
1377 #
1378 # The server must be running prior to invoking this rule
1379 #
1380 ConfigureUsers:
1381 ifndef PEGASUS_PAM_AUTHENTICATION
1382         -cimuser -l
1383         -cimuser -a -u $(PEGASUS_TEST_USER_ID) -w $(PEGASUS_TEST_USER_PASS)
1384 endif
1385
1386 #
1387 # ConfigureAuthorizations rule
1388 #
1389 # The server must be running prior to invoking this rule
1390 #
1391 ConfigureAuthorizations:
1392         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test/cimv2 -R -W
1393         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/cimv2 -R -W
1394         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/PG_Internal -R -W
1395         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/PG_InterOp -R -W
1396         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/benchmark -R -W
1397         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/sampleprovider -R -W
1398         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test/static -R -W
1399         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/SampleProvider -R -W
1400         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root -R -W
1401         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/MCCAtest/A -R -W
1402         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/MCCAtest/B -R -W
1403         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test/TestProvider -R -W
1404         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1 -R -W
1405         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test2 -R -W
1406         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test3 -R -W
1407         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test4 -R -W
1408         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test5 -R -W
1409         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test6 -R -W
1410         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2 -R -W
1411         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2/test3 -R -W
1412         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2/test3/test4 -R -W
1413         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2/test3/test4/test5 -R -W
1414         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2/test3/test4/test5/test6 -R -W
1415 ifeq ($(PEGASUS_ENABLE_PRIVILEGE_SEPARATION),true)
1416         cimauth -a -u $(PEGASUS_CIMSERVERMAIN_USER) -n root/cimv2 -R -W
1417 endif
1418
1419 startcimWithoutSSL: FORCE
1420         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart
1421         $(SLEEP) 5
1422
1423 startcimWithSSL: FORCE
1424         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="enableHttpConnection=false enableHttpsConnection=true"
1425         $(SLEEP) 5
1426
1427 ###############################################################################
1428 ##
1429 ## check_for_cores - used to search for core files in the build environment.
1430 ##
1431 ## This option will search (1) each source directory, (2) the PEGASUS_CORE_DIR
1432 ## if it is defined and (3) the PEGASUS_TMP directory.
1433 ##
1434 ###############################################################################
1435 CORE_FILE_LIST = $(PEGASUS_HOME)/CoreFileList
1436
1437 check_core_search_results:
1438 ifneq ($(wildcard $(CORE_FILE_LIST)), )
1439         @$(ECHO) "*** One or more core files found. ***"
1440         @$(CAT) $(CORE_FILE_LIST)
1441         @exit 1
1442 endif
1443
1444 ifdef PEGASUS_CORE_DIR
1445    CORE_FILES_IN_CORE_DIR = \
1446        $(wildcard $(PEGASUS_CORE_DIR)/$(PLATFORM_CORE_PATTERN))
1447 endif
1448 ifdef PEGASUS_TMP
1449    CORE_FILES_IN_TMP_DIR = \
1450        $(wildcard $(PEGASUS_TMP)/$(PLATFORM_CORE_PATTERN))
1451 endif
1452
1453 generate_core_file_list:
1454         @$(RM) $(CORE_FILE_LIST)
1455         @$(MAKE) -s directory=$(PEGASUS_ROOT) general OPTION=CORE_SEARCH \
1456             CORE_FILE_LIST=$(CORE_FILE_LIST)
1457 ifdef PEGASUS_CORE_DIR
1458    ifneq ($(CORE_FILES_IN_CORE_DIR), )
1459         @$(ECHO) $(CORE_FILES_IN_CORE_DIR) >> $(CORE_FILE_LIST)
1460    endif
1461 endif
1462 ifdef PEGASUS_TMP
1463    ifneq ($(CORE_FILES_IN_TMP_DIR), )
1464         @$(ECHO) $(CORE_FILES_IN_TMP_DIR) >> $(CORE_FILE_LIST)
1465    endif
1466 endif
1467
1468 check_for_cores:
1469         @$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile \
1470             generate_core_file_list
1471         @$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile \
1472             check_core_search_results
1473
1474 ###############################################################################
1475 ##
1476 ## option_summary - used to generate a concise list of build options for use in
1477 ## a nightly build status report.  This is not intended to be a complete list,
1478 ## so it is likely that some options are omitted.  New options may be added
1479 ## here as needs dictate.
1480 ##
1481 ###############################################################################
1482
1483 OPTION_SUMMARY =
1484 ifeq ($(PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER),true)
1485     OPTION_SUMMARY += "+CMPI"
1486 endif
1487 ifeq ($(PEGASUS_ENABLE_CQL),true)
1488     OPTION_SUMMARY += "+CQL"
1489 endif
1490 ifeq ($(PEGASUS_HAS_ICU),true)
1491     OPTION_SUMMARY += "+ICU"
1492 endif
1493 ifeq ($(PEGASUS_ENABLE_IPV6),true)
1494     OPTION_SUMMARY += "+IPv6"
1495 endif
1496 ifeq ($(PEGASUS_ENABLE_JMPI_PROVIDER_MANAGER),true)
1497     OPTION_SUMMARY += "+JMPI"
1498 endif
1499 ifeq ($(PEGASUS_ENABLE_PRIVILEGE_SEPARATION),true)
1500     OPTION_SUMMARY += "+PrivSep"
1501 endif
1502 ifdef PEGASUS_ENABLE_EXECQUERY
1503     OPTION_SUMMARY += "+Query"
1504 endif
1505 ifdef PEGASUS_ENABLE_REMOTE_CMPI
1506     OPTION_SUMMARY += "+RCMPI"
1507 endif
1508 ifeq ($(PEGASUS_ENABLE_SLP),true)
1509     OPTION_SUMMARY += "+SLP"
1510 endif
1511 ifeq ($(PEGASUS_USE_SQLITE_REPOSITORY),true)
1512     OPTION_SUMMARY += "+SQLite"
1513 endif
1514 ifdef PEGASUS_HAS_SSL
1515     OPTION_SUMMARY += "+SSL"
1516 endif
1517 ifeq ($(PEGASUS_ENABLE_PROTOCOL_WSMAN),true)
1518     OPTION_SUMMARY += "+WSMan"
1519 endif
1520
1521 option_summary:
1522         @$(ECHO) "$(OPTION_SUMMARY)"