BUG#: 5706
[tpot/pegasus/.git] / TestMakefile
1 #//%2006////////////////////////////////////////////////////////////////////////
2 #//
3 #// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 #// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 #// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
6 #// IBM Corp.; EMC Corporation, The Open Group.
7 #// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 #// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
9 #// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 #// EMC Corporation; VERITAS Software Corporation; The Open Group.
11 #// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 #// EMC Corporation; Symantec Corporation; The Open Group.
13 #//
14 #// Permission is hereby granted, free of charge, to any person obtaining a copy
15 #// of this software and associated documentation files (the "Software"), to
16 #// deal in the Software without restriction, including without limitation the
17 #// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
18 #// sell copies of the Software, and to permit persons to whom the Software is
19 #// furnished to do so, subject to the following conditions:
20 #// 
21 #// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
22 #// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 #// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
24 #// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 #// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 #// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
27 #// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 #// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 #//
30 #//==============================================================================
31 ###############################################################################
32 ##
33 ## Test Makefile for Pegasus CIMOM
34 ##
35 ## see the usage rule for documentation of rules etc.
36 ##
37 ##
38 ###############################################################################
39
40 error:
41         @ $(ECHO) "Specify desired makefile option (i.e., unittests, usage )"
42
43 include $(PEGASUS_ROOT)/mak/config.mak
44 include $(PEGASUS_ROOT)/mak/test.mak
45 include $(PEGASUS_ROOT)/mak/commands.mak
46
47 system = localhost
48
49 .PHONY: FORCE
50
51 FORCE:
52
53 usage: FORCE
54         $(USAGE)
55         $(USAGE)"TestMakefile Primary Targets:"
56         $(USAGE)
57         $(USAGE)"The following are all standalone tests. They stop and start the server,"
58         $(USAGE)"and build repositories as needed."
59         $(USAGE)
60         $(USAGE)"alltests           - Execute unittests and servertests"
61         $(USAGE)"unittests          - Execute the unit functional tests - no repository"
62         $(USAGE)"                     or active server is required"
63         $(USAGE)"servertests        - Execute a basic server test suites (No security, No SSL)"
64         $(USAGE)"standardtests      - Execute an extended server test suites "
65         $(USAGE)"                     using multiple options."
66         $(USAGE)"serverquicktests   - Executes a brief server test"
67         $(USAGE)"perftests          - Executes a brief server performance test"
68         $(USAGE)
69         $(USAGE)"usage2             - usage on secondary test targets"
70         $(USAGE)"usagetrace         - usage on trace targets"
71         $(USAGE)"stresstests        - Execute the default stress test suite"
72         $(USAGE)
73
74 usage2: FORCE
75         $(USAGE)
76         $(USAGE)"TestMakefile Secondary Targets:"
77         $(USAGE)
78         $(USAGE)"The following are run as part of the Primary target test suites and may"
79         $(USAGE)"also be invoked as standalone tests."
80         $(USAGE)
81         $(USAGE)"TestXMLRepository       - Executes poststarttests on XML repository"
82         $(USAGE)"                          built with cimmofl."
83         $(USAGE)"TestXMLRepositoryServer - Executes poststarttests on XML repository" 
84         $(USAGE)"                          built with cimmof."
85         $(USAGE)"TestXMLCmpRepository    - Executes poststarttests on XML compressed"
86         $(USAGE)"                          repository built with cimmofl."
87         $(USAGE)"TestBinRepository       - Executes poststarttests on binary repository "
88         $(USAGE)"                          built with cimmofl."
89         $(USAGE)"TestBinRepositoryServer - Executes poststarttests on binary repository"
90         $(USAGE)"                          built with cimmof."
91         $(USAGE)"TestBinCmpRepository    - Executes poststarttests on binary compressed"
92         $(USAGE)"                          repository built with cimmofl."
93         $(USAGE)
94         $(USAGE)"The following require the repository to be pre-built."
95         $(USAGE)
96         $(USAGE)"run_SSL_TS1             - Executes the SSL tests"
97         $(USAGE)"run_OOP_TS1             - Executes the Out Of Process Provider tests"
98         $(USAGE)"run_G11N_TS1            - Executes the Globalization tests"
99         $(USAGE)
100         $(USAGE)"The following require the repository to be pre-built and the server to be started."
101         $(USAGE)
102         $(USAGE)"serversuite             - the collection of test run by the servertests rule"
103         $(USAGE)"serverquicksuite        - The collection of test run by the serverquicktests rule"
104         $(USAGE)"run_STRESS_TS1          - Executes the stresstests"
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         $(RMDIRHIER) $(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
278
279
280 servertests: servertestsclean servertestssetup serversuite
281         @ $(ECHO) "+++++ TestMakefile servertests suites complete"
282
283 serversuite: FORCE
284         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests
285         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestBinRepository
286         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_Cimsub_InterOp
287         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOP_TS1
288         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_IndInit_TS1
289         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOPProvFail_TS1
290         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOPProvFail_TS2
291         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOPProvFail_TS3
292         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_INDSSL_TS1
293         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_SSL_TS1
294         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_G11N_TS1
295         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile runCBATestSuites
296         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_SDK_TS1
297         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_ExportClientSSL_TS1
298
299 #####################
300 #
301 # stresstests
302 #
303 stresstests:
304         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_STRESS_TS1
305
306 ####################
307 #
308 # serverquicktests
309 #
310 serverquicktests: servertestsclean servertestssetup serverquicksuite
311         @ $(ECHO) "+++++ TestMakefile serverquicktests complete"
312
313 serverquicksuite: FORCE
314         $(PEGASUS_HOME)/bin/Client
315         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests
316         $(PEGASUS_HOME)/bin/TestClient
317
318 ####################
319 #
320 # perftests - simple performance test until we have better
321 #
322 # - Turns statistics on (uses TestInterop until we have better)
323 # - runs and times serverquicktests suite 
324 # - runs cimperf to displat the statistics
325 # - turns statistics off 
326 #
327 perftests: servertestsclean servertestssetup perfsuite
328
329 perfsuite: FORCE
330         $(PEGASUS_HOME)/bin/TestInterop on
331         $(TIME_CMD) $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests
332         @ $(ECHO) " "
333         $(TIME_CMD) $(PEGASUS_HOME)/bin/TestClient
334         @ $(ECHO) " "
335         $(TIME_CMD) $(PEGASUS_HOME)/bin/benchmarkTest
336         @ $(ECHO) " "
337         @ $(ECHO) " "
338         $(TIME_CMD) $(PEGASUS_HOME)/bin/cimperf
339         @ $(ECHO) " "
340         $(PEGASUS_HOME)/bin/TestInterop off
341
342
343 ####################
344 #
345 # alltests
346 #
347 alltests: unittests servertests
348 ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
349         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
350         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile uninstall
351 endif
352         @ $(ECHO) "+++++ TestMakefile alltests Complete"
353
354 ###############################################################################
355 ##  Test Suite Definitions
356 ###############################################################################
357
358 ###############################################################################
359 ##  OOP Test Suite 1: "Out-of-Process"(OOP) Provider Tests 
360 ##
361 ##  Configuration Options: forceProviderProcesses=true
362 ##
363 ##  If PEGASUS_DEFAULT_ENABLE_OOP is set, then tests are run with OOP disabled
364 ##  since tests have already been run with OOP enabled.
365 ##
366 ##
367 ###############################################################################
368 ifeq ($(PEGASUS_DEFAULT_ENABLE_OOP),true)
369 OOP_TS1_CONFIG_OPTIONS = forceProviderProcesses=false
370 else
371 OOP_TS1_CONFIG_OPTIONS = forceProviderProcesses=true
372 endif
373
374 OOP_TS1_TEST_CMDS = \
375         $(MAKE)@@--directory=$(PEGASUS_ROOT)@@Makefile@@-s@@poststarttests
376
377 run_OOP_TS1:
378         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
379             CIMSERVER_CONFIG_OPTIONS="$(OOP_TS1_CONFIG_OPTIONS)" \
380             TESTSUITE_CMDS="$(OOP_TS1_TEST_CMDS)"
381
382 ###############################################################################
383
384 ###############################################################################
385 ##  IndInit Test Suite 1: IndicationService Initialization Tests 
386 ##
387 ##  Configuration Options: (none)
388 ##
389 ###############################################################################
390 IndInit_TS1_CONFIG_OPTIONS = 
391 IndInit_TS1a_TEST_CMDS = \
392         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Pegasus/IndicationService/tests/ProcessIndication@@IndInit_TS1a
393 IndInit_TS1b_TEST_CMDS = \
394         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Pegasus/IndicationService/tests/ProcessIndication@@IndInit_TS1b
395
396 run_IndInit_TS1:
397         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
398             CIMSERVER_CONFIG_OPTIONS="$(IndInit_TS1_CONFIG_OPTIONS)" \
399             TESTSUITE_CMDS="$(IndInit_TS1a_TEST_CMDS)"
400         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
401             CIMSERVER_CONFIG_OPTIONS="$(IndInit_TS1_CONFIG_OPTIONS)" \
402             TESTSUITE_CMDS="$(IndInit_TS1b_TEST_CMDS)"
403
404 ###############################################################################
405 ##  OOPProvFail Test Suite 1: OOP Provider Module Failure Tests
406 ##
407 ##  Configuration Options: forceProviderProcesses=true
408 ##  enableAuthentication=true, enableAuthentication=false
409 ##
410 ##  NOTE: Regardless of the setting of PEGASUS_DEFAULT_ENABLE_OOP, this test
411 ##  suite is always run with OOP enabled.  This test suite causes a provider to
412 ##  exit.  Running this test suite with OOP disabled would cause the cimserver
413 ##  to exit and the test suite to fail.
414 ##
415 ##  NOTE: The test is run once with authentication enabled, and once without
416 ##  authentication enabled.
417 ##
418 ###############################################################################
419 OOPProvFail_TS1a_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=true
420 OOPProvFail_TS1b_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=false
421 OOPProvFail_TS1_TEST_CMDS = \
422         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS1
423
424 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
425 run_OOPProvFail_TS1:
426         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
427             CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS1a_CONFIG_OPTIONS)" \
428             TESTSUITE_CMDS="$(OOPProvFail_TS1_TEST_CMDS)"
429         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
430             CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS1b_CONFIG_OPTIONS)" \
431             TESTSUITE_CMDS="$(OOPProvFail_TS1_TEST_CMDS)"
432 else
433 run_OOPProvFail_TS1: FORCE
434         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping run_OOPProvFail_TS1"
435 endif
436
437 ###############################################################################
438 ##  OOPProvFail Test Suite 2: OOP Provider Module Failure on IndicationService 
439 ##                            Initialization Tests
440 ##
441 ##  Configuration Options: forceProviderProcesses=true
442 ##                         enableAuthentication=true
443 ##
444 ##  NOTE: Regardless of the setting of PEGASUS_DEFAULT_ENABLE_OOP, this test
445 ##  suite is always run with OOP enabled.  This test suite causes a provider to
446 ##  exit.  Running this test suite with OOP disabled would cause the cimserver
447 ##  to exit and the test suite to fail.
448 ##
449 ###############################################################################
450 OOPProvFail_TS2_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=true
451 OOPProvFail_TS2a_TEST_CMDS = \
452         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS2a
453 OOPProvFail_TS2b_TEST_CMDS = \
454         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS2b
455
456 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
457 run_OOPProvFail_TS2:
458         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
459             CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS2_CONFIG_OPTIONS)" \
460             TESTSUITE_CMDS="$(OOPProvFail_TS2a_TEST_CMDS)"
461         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
462             CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS2_CONFIG_OPTIONS)" \
463             TESTSUITE_CMDS="$(OOPProvFail_TS2b_TEST_CMDS)"
464 else
465 run_OOPProvFail_TS2: FORCE
466         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping run_OOPProvFail_TS2"
467 endif
468
469 ###############################################################################
470 ##  OOPProvFail Test Suite 3: OOP Provider Module Failure CIM Server restart
471 ##                            Tests
472 ##
473 ##  Configuration Options: forceProviderProcesses=true
474 ##                         enableAuthentication=true
475 ##
476 ##  NOTE: Regardless of the setting of PEGASUS_DEFAULT_ENABLE_OOP, this test
477 ##  suite is always run with OOP enabled.  This test suite causes a provider to
478 ##  exit.  Running this test suite with OOP disabled would cause the cimserver
479 ##  to exit and the test suite to fail.
480 ##
481 ###############################################################################
482 OOPProvFail_TS3_CONFIG_OPTIONS = forceProviderProcesses=true enableAuthentication=true
483 OOPProvFail_TS3a_TEST_CMDS = \
484         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS3a
485 OOPProvFail_TS3b_TEST_CMDS = \
486         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/OOPModuleFailureProvider/testclient@@OOPProvFail_TS3b
487
488 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
489 run_OOPProvFail_TS3:
490         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
491             CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS3_CONFIG_OPTIONS)" \
492             TESTSUITE_CMDS="$(OOPProvFail_TS3a_TEST_CMDS)"
493         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
494             CIMSERVER_CONFIG_OPTIONS="$(OOPProvFail_TS3_CONFIG_OPTIONS)" \
495             TESTSUITE_CMDS="$(OOPProvFail_TS3b_TEST_CMDS)"
496 else
497 run_OOPProvFail_TS3: FORCE
498         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping run_OOPProvFail_TS3"
499 endif
500
501 ###############################################################################
502 ##  Indication SSL Test Suite 1: Indication Testing over HTTPS
503 ##
504 ##  Configuration Options: (none)
505 ##
506 ###############################################################################
507 INDSSL_TS1a_CONFIG_OPTIONS = enableHttpsConnection=true enableAuthentication=false
508 INDSSL_TS1a_TEST_CMDS = \
509         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/IndicationStressTestProvider/testclient@@-f@@Makefile@@run_TS1_AuthenticationDisabled
510
511 INDSSL_TS1b_CONFIG_OPTIONS = enableHttpsConnection=true enableAuthentication=true sslClientVerificationMode=required
512 INDSSL_TS1b_TEST_CMDS = \
513         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/IndicationStressTestProvider/testclient@@-f@@Makefile@@run_TS1_AuthenticationEnabled
514
515
516 ifdef PEGASUS_HAS_SSL
517 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
518 run_INDSSL_TS1: EnableUsers Create_SSL_Certificate_ignore
519         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
520             CIMSERVER_CONFIG_OPTIONS="$(INDSSL_TS1a_CONFIG_OPTIONS)" \
521             TESTSUITE_CMDS="$(INDSSL_TS1a_TEST_CMDS)"
522         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
523             CIMSERVER_CONFIG_OPTIONS="$(INDSSL_TS1b_CONFIG_OPTIONS)" \
524             TESTSUITE_CMDS="$(INDSSL_TS1b_TEST_CMDS)"
525 else
526 run_INDSSL_TS1: FORCE
527         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping run_INDSSL_TS1"     
528 endif
529 else
530 run_INDSSL_TS1: FORCE
531         @ $(ECHO) "+++++ PEGASUS_HAS_SSL not defined: Skipping run_INDSSL_TS1"
532 endif
533
534
535 ###############################################################################
536  
537 ###############################################################################
538 ##  SSL Test Suite 1: SSL Tests
539 ##
540 ##  Configuration Options: enableAuthentication=true
541 ##                         enableHttpsConnection=true
542 ##                         sslClientVerificationMode=optional
543 ##                         sslTrustStoreUserName=$(CURRENT_USER)
544 ##
545 ###############################################################################
546 SSL_TS1_CONFIG_OPTIONS = enableHttpsConnection=true enableAuthentication=true \
547        sslClientVerificationMode=optional sslTrustStoreUserName=$(CURRENT_USER)
548 SSL_TS1_TEST_CMDS = \
549        $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Clients/cimtrust/tests@@SSLCertificateTest1
550 SSL_TS2_TEST_CMDS = \
551        $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Clients/cimcrl/tests@@SSLCRLTest1
552
553 ifdef PEGASUS_HAS_SSL
554 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
555 run_SSL_TS1: FORCE
556         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
557             CIMSERVER_CONFIG_OPTIONS="$(SSL_TS1_CONFIG_OPTIONS)" \
558             TESTSUITE_CMDS="$(SSL_TS1_TEST_CMDS)"
559         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
560             CIMSERVER_CONFIG_OPTIONS="$(SSL_TS1_CONFIG_OPTIONS)" \
561             TESTSUITE_CMDS="$(SSL_TS2_TEST_CMDS)"
562 else
563 run_SSL_TS1: FORCE
564         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping run_SSL_TS1"        
565 endif
566 else
567 run_SSL_TS1: FORCE
568         @ $(ECHO) "+++++ PEGASUS_HAS_SSL not defined: Skipping run_SSL_TS1 poststarttest"
569
570 endif
571
572 ############################################################################
573
574 # Create_SSL_Certificate
575 #
576 # create a certificate that can be used for certification testing.
577 # It is currently used by the following tests:
578 #            -run_INDSSL_TS1
579 #
580 Create_SSL_Certificate_ignore: FORCE
581         -$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile Create_SSL_Certificate
582
583 Create_SSL_Certificate: FORCE
584 ifdef PEGASUS_HAS_SSL
585 ifdef PEGASUS_TEST_USER_DEFINED
586         $(ECHO) "Creating SSL certificate for test"
587         cimtrust -a -U $(PEGASUS_TEST_USER_ID) -f $(PEGASUS_HOME)/server.pem -Ts
588 endif
589 else
590         $(ECHO) "PEGASUS_HAS_SSL not defined - Not Creating SSL certificate for test"
591 endif
592
593 ###############################################################################
594 ##  G11N Test Suite 1: Globalization Tests 
595 ##
596 ##  Configuration Options: forceProviderProcesses=false
597 ##
598 ###############################################################################
599 G11N_TS1_CONFIG_OPTIONS = forceProviderProcesses=false
600 G11N_TS1_TEST_CMDS = \
601         $(MAKE) --directory $(PEGASUS_ROOT)/src/Clients/g11ntest \
602             -f Makefile g11ntest
603
604 run_G11N_TS1:
605         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
606             CIMSERVER_CONFIG_OPTIONS="$(G11N_TS1_CONFIG_OPTIONS)" \
607             TESTSUITE_CMDS="$(G11N_TS1_TEST_CMDS)"
608
609 ###############################################################################
610 ##  Stress Test Suite 1:  Default Stress Tests
611 ##
612 ##  Configuration Options: (none)
613 ##
614 ###############################################################################
615 STRESS_TS1_CONFIG_OPTIONS =
616 STRESS_TS1_TEST_CMDS = \
617         TestStressTestController
618
619 run_STRESS_TS1:
620         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
621             CIMSERVER_CONFIG_OPTIONS="$(STRESS_TS1_CONFIG_OPTIONS)" \
622             TESTSUITE_CMDS="$(STRESS_TS1_TEST_CMDS)"
623 ###############################################################################
624
625 ###############################################################################
626 ##  SDK Test Suite 1:  SDK Tests
627 ##
628 ##  Configuration Options: (none)
629 ##
630 ###############################################################################
631 SDK_TS1_CONFIG_OPTIONS =
632 SDK_TS1_TEST_CMDS = \
633         $(MAKE) --directory $(PEGASUS_ROOT)/src/SDK/samples \
634             -f Makefile testSDK 
635
636 ifeq ($(PEGASUS_TEST_SDK),true)
637 run_SDK_TS1: FORCE
638         $(MAKE) --directory=$(PEGASUS_ROOT)/mak \
639             -f $(PEGASUS_ROOT)/mak/SDKMakefile stageINCLUDE \
640             PEGASUS_STAGING_DIR=$(PEGASUS_HOME) \
641             PEGASUS_INCLUDE_DIR=/include
642         $(MAKE) --directory=$(PEGASUS_ROOT)/src/SDK/samples \
643             -f Makefile clean
644         $(MAKE) --directory=$(PEGASUS_ROOT)/src/SDK/samples \
645             -f Makefile PEGASUS_INCLUDE_DIR=$(PEGASUS_HOME)/include
646         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
647             CIMSERVER_CONFIG_OPTIONS="$(SDK_TS1_CONFIG_OPTIONS)" \
648             TESTSUITE_CMDS="$(SDK_TS1_TEST_CMDS)"
649 else
650 run_SDK_TS1: FORCE
651         @ $(ECHO) "+++++ PEGASUS_TEST_SDK is not true: Skipping run_SDK_TS1"    
652 endif
653 ###############################################################################
654
655 ###############################################################################
656 ##  Export Client SSL Test Suite 1:
657 ##
658 ##  Configuration Options: enableHttpsConnection=true
659 ##
660 ###############################################################################
661 ExportClientSSL_TS1_CONFIG_OPTIONS = enableHttpsConnection=true
662 ExportClientSSL_TS1_TEST_CMDS = \
663         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Pegasus/ExportClient/tests/ExportClient@@-f@@Makefile@@runExportClientSSL_TS1
664
665 ifdef PEGASUS_HAS_SSL
666 run_ExportClientSSL_TS1:
667         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
668             CIMSERVER_CONFIG_OPTIONS="$(ExportClientSSL_TS1_CONFIG_OPTIONS)" \
669             TESTSUITE_CMDS="$(ExportClientSSL_TS1_TEST_CMDS)"
670 else
671 run_ExportClientSSL_TS1: FORCE
672         @ $(ECHO) "+++++ PEGASUS_HAS_SSL not defined: Skipping run_ExportClientSSL_TS1"
673 endif
674
675 ###############################################################################
676
677
678
679 ###############################################################################
680 ##  cimsub CLI Test Suite 1:  PG_InterOp Tests
681 ##
682 ##  Configuration Options: (none)
683 ##
684 ###############################################################################
685 CIMSUB_INTEROP_CONFIG_OPTIONS =
686 CIMSUB_INTEROP_TEST_CMDS = \
687         $(MAKE) --directory \
688             $(PEGASUS_ROOT)/src/Clients/cimsub/tests/testscriptInterOp \
689             -f Makefile cimsubTest_InterOp
690 run_Cimsub_InterOp: FORCE
691         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
692             CIMSERVER_CONFIG_OPTIONS="$(CIMSUB_INTEROP_CONFIG_OPTIONS)" \
693             TESTSUITE_CMDS="$(CIMSUB_INTEROP_TEST_CMDS)"
694 ###############################################################################
695
696 ###############################################################################
697
698
699
700 ##############################################################################
701 ##
702 ## TestXMLRepository rule is used to run the poststarttests suite on
703 ## the XML Repository built using cimmofl
704 ##
705 ## TestXMLRepositoryServer rule is used to run the poststarttests suite on
706 ## the XML Repository built using cimmof
707 ##
708 ## TestXMLCmpRepository rule is used to run the poststarttest suite on 
709 ## the XML Compressed Repository built using cimmofl
710 ##
711
712 ############################
713 ##
714 ## TestXMLRepository
715 ##
716
717 TestXMLRepository: TestXMLClean TestXMLBuildRepo  TestXMLRepo
718         @ $(ECHO) TestXMLRepository +++++ passed all test
719
720 ############################
721 ##
722 ## TestXMLRepositoryServer
723 ##
724 TestXMLRepositoryServer: TestXMLClean  TestXMLBuildRepoServ TestXMLRepo
725         @ $(ECHO) TestXMLRepositoryServer +++++ passed all test
726
727 ############################
728 ##
729 ## TestXMLCmpRepository -  run poststarttest on Compressed BIN Repository
730 ##
731 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY
732 TestXMLCmpRepository: FORCE
733         @ $(ECHO) TestXMLCmpRepository +++++ Repository compressed by default - nothing more to test.
734         @ $(ECHO) TestXMLCmpRepository +++++ passed all test
735 else
736
737 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST
738
739 TestXMLCmpRepository: TestXMLClean  TestCmpBuild TestXMLBuildRepo TestXMLRepo TestRegBuild
740         @ $(ECHO) TestXMLCmpRepository +++++ passed all test
741 else
742 TestXMLCmpRepository: FORCE
743         @ $(ECHO) TestXMLCmpRepository +++++ Not tested 
744         @ $(ECHO) TestXMLCmpRepository +++++ refer to readme.compressed_repository
745         @ $(ECHO) TestXMLCmpRepository +++++ to enable: set PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST=true 
746 endif
747 endif
748
749 ###########################
750 ##
751 ## TestXMLClean
752 ##
753 TestXMLClean: FORCE
754         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop 
755         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryclean REPOSITORY_NAME=repository_xml
756
757
758 ###########################
759 ##
760 ## TestXMLStartServer
761 ##
762 TestXMLStartServer: FORCE
763         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run
764         - $(MKDIRHIER) $(PEGASUS_HOME)/repository_xml
765         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="repositoryDir=$(PEGASUS_HOME)/repository_xml"
766         $(SLEEP) 5
767
768 ####
769 #### The following caused the cimserver to fail on startup
770 ####
771 ####    $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="enableBinRepository=false repositoryDir=$(PEGASUS_HOME)/repository_xml"
772
773 ###########################
774 ##
775 ## TestXMLBuildRepo
776 ##
777 TestXMLBuildRepo: FORCE
778         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
779         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
780
781
782 ###########################
783 ##
784 ## TestXMLBuildRepoServ
785 ##
786 TestXMLBuildRepoServ: TestXMLStartServer
787         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
788         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
789         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop 
790
791
792 ###########################
793 ##
794 ## TestXMLRepo
795 ##
796 TestXMLRepo: servertestsclean
797         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestXMLStartServer
798         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
799         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop 
800
801
802
803
804
805
806 ##############################################################################
807 ##
808 ## TestBinRepository rule is used to run the poststarttests suite on
809 ## the Binary Repository built using cimmofl
810 ##
811 ## TestBinRepositoryServer rule is used to run the poststarttests suite on
812 ## the Binary Repository built using cimmof
813 ##
814 ## TestBinCmpRepository rule is used to run the poststarttest suite on 
815 ## the Binry Compressed Repository built using cimmofl
816 ##
817
818 ############################
819 ##
820 ## TestBinRepository
821 ##
822 ### bug 3011 disabled Binary Repository testing on LINUX_IA64 to allow
823 ### the nightly tests to run
824
825 TestBinRepository: TestBinClean TestBinBuildRepo  TestBinRepo
826         @ $(ECHO) TestBinRepository +++++ passed all test
827
828
829 ############################
830 ##
831 ## TestBinRepositoryServer
832 ##
833 TestBinRepositoryServer: TestBinClean  TestBinBuildRepoServ TestBinRepo
834         @ $(ECHO) TestBinRepositoryServer +++++ passed all test
835
836 ############################
837 ##
838 ## TestBinCmpRepository -  run poststarttest on Compressed BIN Repository
839 ##
840 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY
841 TestBinCmpRepository: FORCE
842         @ $(ECHO) TestBinCmpRepository +++++ Repository compressed by default - nothing more to test.
843         @ $(ECHO) TestBinCmpRepository +++++ passed all test
844 else
845
846 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST
847
848 TestBinCmpRepository: TestBinClean  TestCmpBuild TestBinBuildRepo TestBinRepo TestRegBuild
849         @ $(ECHO) TestBinCmpRepository +++++ passed all test
850 else
851 TestBinCmpRepository: FORCE
852         @ $(ECHO) TestBinCmpRepository +++++ Not tested 
853         @ $(ECHO) TestBinCmpRepository +++++ refer to readme.compressed_repository
854         @ $(ECHO) TestBinCmpRepository +++++ to enable: set PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST=true 
855 endif
856 endif
857
858
859 ###########################
860 ##
861 ## TestBinClean
862 ##
863 TestBinClean: FORCE
864         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop 
865         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryclean REPOSITORY_NAME=repository_bin
866
867
868 ###########################
869 ##
870 ## TestBinStartServer
871 ##
872 TestBinStartServer: FORCE
873         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run
874         - $(MKDIRHIER) $(PEGASUS_HOME)/repository_bin
875         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="enableBinaryRepository=true repositoryDir=$(PEGASUS_HOME)/repository_bin"
876         $(SLEEP) 5
877
878 ###########################
879 ##
880 ## TestBinBuildRepo
881 ##
882 TestBinBuildRepo: FORCE
883         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
884         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
885
886
887 ###########################
888 ##
889 ## TestBinBuildRepoServ
890 ##
891 TestBinBuildRepoServ: TestBinStartServer
892         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
893         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
894         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop 
895
896
897 ###########################
898 ##
899 ## TestBinRepo
900 ##
901 TestBinRepo: servertestsclean 
902         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestBinStartServer
903         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
904         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop 
905
906
907
908
909 ############################
910 ##
911 ## TestCmpBuild - used to compile the repository for compression
912 ##
913 TestCmpBuild: FORCE
914         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository clean
915         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository depend PEGASUS_ENABLE_COMPRESSED_REPOSITORY=1
916         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository PEGASUS_ENABLE_COMPRESSED_REPOSITORY=1
917
918
919 ############################
920 ##
921 ## TestRegBuild - used to compile the repository for no compression
922 ##
923 TestRegBuild: FORCE
924         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository clean
925         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository depend 
926         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository 
927
928
929 ###############################################################################
930 ##
931 ## Trace Configuration
932 ##
933 ## Options: see usagetrace rule
934 ##
935 ###############################################################################
936
937 usagetrace: FORCE
938         $(USAGE)
939         $(USAGE)"TestMakefile Trace Commands: "
940         $(USAGE)"  The cimserver must be running when using W=c which is the default for W"
941         $(USAGE)
942         $(USAGE)" traceon  W=[current/planned(c,p):   Enables all tracing."
943         $(USAGE)" traceoff W=[current/planned(c,p):   Disables all tracing."
944         $(USAGE)" tracesettings:                      Displays all trace settings."
945         $(USAGE)" tracecomp:                          Displays a trace componenets list."
946         $(USAGE)" traceon-CL C=[comp] L=[level(1,2,3,4)] W=[current/planned(c,p): "
947         $(USAGE)"                           Enables tracing on component C at trace level L."
948         $(USAGE)
949         $(USAGE)" W defaults to c in the above commands where W can be specified" 
950         $(USAGE)
951         $(USAGE)"  Usage examples:"
952         $(USAGE)"   traceon       turns on trace in current server config"
953         $(USAGE)"   traceon W=c   turns on trace in current server config"
954         $(USAGE)"   traceon W=p   turns on trace in planned server config"
955         $(USAGE)"   traceoff      turns on trace in current server config"
956         $(USAGE)"   traceoff W=c  turns on trace in current server config"
957         $(USAGE)"   traceoff W=p  turns on trace in planned server config"
958         $(USAGE)
959         $(USAGE)"   traceon-CL C=DiscardedData L=3 W=c"
960         $(USAGE)"     Turns on trace for DiscardedData at level 3 in current server config"
961         $(USAGE)"   traceon-CL C=DiscardedData L=3 W=p"
962         $(USAGE)"     Turns on trace for DiscardedData at level 3 in planned server config"
963         $(USAGE)
964         $(USAGE)
965
966 traceon: FORCE
967         @ cimconfig -s traceComponents=ALL -$W 
968         @ cimconfig -s traceLevel=3 -$W
969         $(MAKE) -f $(ROOT)/TestMakefile tracesettings
970
971
972 traceoff: FORCE
973         @ cimconfig -s traceComponents=  -$W
974         $(MAKE) -f $(ROOT)/TestMakefile tracesettings
975
976
977 tracesettings: FORCE
978         @ $(ECHO) " "
979         cimconfig -g traceComponents -c -p
980         @ $(ECHO) " "
981         cimconfig -g traceLevel -c -p
982         @ $(ECHO) " "
983         cimconfig -g traceFilePath -c -p
984         @ $(ECHO) " "
985
986 traceon-CL: FORCE
987         @ cimconfig -s traceComponents=$C -$W
988         @ cimconfig -s traceLevel=$L -$W
989         $(MAKE) -f $(ROOT)/TestMakefile tracesettings
990
991 tracecomp: FORCE
992         $(USAGE)
993         $(USAGE)"Trace component list:"
994         $(USAGE)
995         $(USAGE)"Channel"
996         $(USAGE)"XmlParser"
997         $(USAGE)"XmlWriter"
998         $(USAGE)"XmlReader"
999         $(USAGE)"XmlIO"
1000         $(USAGE)"Http"
1001         $(USAGE)"CimData"
1002         $(USAGE)"ProvManager"
1003         $(USAGE)"Repository"
1004         $(USAGE)"Dispatcher"
1005         $(USAGE)"OsAbstraction"
1006         $(USAGE)"Config"
1007         $(USAGE)"IndDelivery"
1008         $(USAGE)"IndHandler"
1009         $(USAGE)"Authentication"
1010         $(USAGE)"Authorization"
1011         $(USAGE)"UserManager"
1012         $(USAGE)"SubscriptionService"
1013         $(USAGE)"Registration"
1014         $(USAGE)"Shutdown"
1015         $(USAGE)"Server"
1016         $(USAGE)"IndicationService"
1017         $(USAGE)"IndicationServiceInternal"
1018         $(USAGE)"ConfigurationManager"
1019         $(USAGE)"MessageQueueService"
1020         $(USAGE)"ProviderManager"
1021         $(USAGE)"ObjectResolution"
1022         $(USAGE)"WQL"
1023         $(USAGE)"CQL"
1024         $(USAGE)"Thread"
1025         $(USAGE)"MetaDispatcher"
1026         $(USAGE)"IPC"
1027         $(USAGE)"IndicationHandlerService"
1028         $(USAGE)"CIMExportRequestDispatcher"
1029         $(USAGE)"Memory"
1030         $(USAGE)"SSL"
1031         $(USAGE)"ControlProvider"
1032         $(USAGE)"AsyncOpNode"
1033         $(USAGE)"CIMOMHandle"
1034         $(USAGE)"BinaryMessageHandler"
1035         $(USAGE)"L10N"
1036         $(USAGE)"ExportClient"
1037         $(USAGE)"Listener"
1038         $(USAGE)"DiscardedData"
1039         $(USAGE)"ProviderAgent"
1040         $(USAGE)
1041
1042 ###############################################################################
1043 ##
1044 ## Trace Configuration - Old rules being deprecated
1045 ##
1046 ## Options:
1047 ##      XMLTraceOn: Enables XML request and response tracing.
1048 ##      ProviderLoadTraceOn: Enables Provider load tracing.
1049 ##      XML+ProviderLoadTraceOn: Enables both XML request/response and Provider
1050 ##                                 load tracing.
1051 ##      AllTraceOn: Enables all tracing.
1052 ##      AllTraceOff: Disables all tracing.
1053 ##      list: Lists trace settings.
1054 ##
1055 ###############################################################################
1056
1057 XMLTraceOn:
1058         cimconfig -s traceComponents=XmlIO -c
1059         cimconfig -s traceLevel=3 -c
1060         cimconfig -g traceComponents
1061         cimconfig -g traceLevel
1062
1063 ProviderLoadTraceOn:
1064         cimconfig -s traceComponents=ProvManager,OsAbstraction
1065         cimconfig -s traceLevel=3 -c
1066         cimconfig -g traceComponents
1067         cimconfig -g traceLevel
1068
1069 XML+ProviderLoadTraceOn:
1070         cimconfig -s traceComponents=XmlIO,ProvManager,OsAbstraction
1071         cimconfig -s traceLevel=3 -c
1072         cimconfig -g traceComponents
1073         cimconfig -g traceLevel
1074
1075 AllTraceOn: traceon
1076
1077 AllTraceOff: traceoff
1078
1079 list: tracesettings
1080
1081 #########################################################################
1082 # standardtests
1083 #
1084 # More testing options...
1085 #
1086 # The standard test seem to contain additional test that may not be able 
1087 # to run on all platforms so they have been grouped here for now rather than
1088 # being included in the serversuite rule.
1089 #
1090 # The test are:
1091 #      TestCimmof
1092 #      TestNoSecurity
1093 #      TestLocalSecurity
1094 #      TestRemoteSecurity
1095 #      TestAuthorization
1096 #
1097 # NOTE: The TestsNoSecurity test is comprised of DisableSecurity and
1098 #       TestNoSecurity.
1099 #
1100 # NOTE: The TestNoSecurity step runs the servertests which builds the
1101 #       the repository that is then left in place for the remaining tests.
1102 #       The cimof test must be before the TestNosecurity step as it removes
1103 #       the repository builds a new one with cimmofl and another one with
1104 #       cimmof and then compares them. 
1105 #
1106 # NOTE: The Authentication test is comprised of EnableAuthentication, 
1107 #       TestLocalSecurity and TestRemoteSecurity. 
1108 #
1109 # NOTE: The Authorization test is comprised of EnableAuthorization and
1110 #       TestAuthorization. 
1111 #
1112 # NOTE: The EnableAuthentication and EnableAuthorization steps require 
1113 #       root access. Pegasus doesn't currently have the infrastructure
1114 #       in place to run the server as root and run the test as non-root.
1115 #       Rather than run everything, server, tests, providers, clients etc.
1116 #       as root many testers prefer to run the tests as non-root. Setting
1117 #       PEGASUS_DISABLE_PRIVILEGED_TESTS in the environment helps to 
1118 #       facilitate that.
1119 #
1120
1121 standardtests: FORCE
1122         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i DisableSecurity
1123         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestCimmof
1124         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestNoSecurity
1125 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
1126         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile EnableAuthentication
1127         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestLocalSecurity
1128         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestRemoteSecurity
1129         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile EnableAuthorization
1130         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestAuthorization
1131 else
1132         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping EnableAuthentication, TestLocalSecurity, and TestRemoteSecurity "
1133         @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping EnableAuthorization and TestAuthorization " 
1134 endif
1135         @ $(ECHO) "+++++ TestMakefile standardtests complete"
1136
1137 TestNoSecurity:
1138         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile servertests
1139         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
1140         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile RunTestClientLocal
1141
1142 TestLocalSecurity:
1143         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile RunTestClientLocal
1144         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests HOSTNAME= PORT= USER= PASSWORD= SECURITY_ENABLED=true
1145
1146 TestRemoteSecurity:
1147         TestClient -user $(PEGASUS_TEST_USER_ID) -password $(PEGASUS_TEST_USER_PASS) $(system):5988
1148         $(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
1149
1150 TestAuthorization:
1151         TestPegClientDeleteNamespace -a -user $(PEGASUS_TEST_USER_ID) -password $(PEGASUS_TEST_USER_PASS)
1152         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile RunTestClientLocal
1153         TestClient -user $(PEGASUS_TEST_USER_ID) -password $(PEGASUS_TEST_USER_PASS) $(system):5988
1154         $(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
1155
1156 TestSubscriptions:
1157         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile DisableSecurity
1158         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
1159         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
1160         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
1161         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/cimv2/Subscription -f Makefile poststarttests
1162         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile cimstop
1163
1164 TestCimmof:
1165         $(MAKE) --directory=$(PEGASUS_ROOT) -f Testcimmof poststarttests
1166
1167 RunTestClientLocal:
1168         TestClient -local
1169
1170 DisableSecurity:
1171         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1172         cimconfig -s enableAuthentication=false -p
1173         cimconfig -s enableNamespaceAuthorization=false -p
1174
1175 EnableUsers:
1176         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1177         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
1178         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile ConfigureUsers
1179
1180 EnableAuthentication:
1181         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1182         cimconfig -s enableAuthentication=true -p
1183         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
1184         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile ConfigureUsers
1185
1186 EnableAuthorization:
1187         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1188         cimconfig -s enableNamespaceAuthorization=true -p
1189         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
1190         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i ConfigureAuthorizations
1191
1192 EnableSSL:
1193         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
1194         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithSSL
1195
1196 #
1197 # ConfigureUsers
1198 #
1199 # The server must be running prior to invoking this rule
1200 #
1201 ConfigureUsers:
1202 ifndef PEGASUS_PAM_AUTHENTICATION
1203         -cimuser -l
1204         -cimuser -a -u $(PEGASUS_TEST_USER_ID) -w $(PEGASUS_TEST_USER_PASS)
1205 endif
1206
1207 #
1208 # ConfigureAuthorizations rule
1209 #
1210 # The server must be running prior to invoking this rule
1211 #
1212 ConfigureAuthorizations:
1213         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test/cimv2 -R -W
1214         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/cimv2 -R -W
1215         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/PG_Internal -R -W
1216         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/PG_InterOp -R -W
1217         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/benchmark -R -W
1218         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/sampleprovider -R -W
1219         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test/static -R -W
1220         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/SampleProvider -R -W
1221         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root -R -W
1222         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/test/A -R -W
1223         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/test/B -R -W
1224         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test/TestProvider -R -W
1225         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1 -R -W
1226         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test2 -R -W
1227         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test3 -R -W
1228         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test4 -R -W
1229         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test5 -R -W
1230         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test6 -R -W
1231         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2 -R -W
1232         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2/test3 -R -W
1233         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2/test3/test4 -R -W
1234         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2/test3/test4/test5 -R -W
1235         cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2/test3/test4/test5/test6 -R -W
1236
1237 startcimWithoutSSL: FORCE
1238         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart
1239         $(SLEEP) 5
1240
1241 startcimWithSSL: FORCE
1242         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="enableHttpConnection=false enableHttpsConnection=true"
1243         $(SLEEP) 5
1244