BUG#: 4362
[tpot/pegasus/.git] / TestMakefile
1 #//%2005////////////////////////////////////////////////////////////////////////
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 #//
12 #// Permission is hereby granted, free of charge, to any person obtaining a copy
13 #// of this software and associated documentation files (the "Software"), to
14 #// deal in the Software without restriction, including without limitation the
15 #// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16 #// sell copies of the Software, and to permit persons to whom the Software is
17 #// furnished to do so, subject to the following conditions:
18 #// 
19 #// THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
20 #// ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
21 #// "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
22 #// LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
23 #// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 #// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25 #// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 #// WITH THE 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)"serverquicktests   - Executes a brief server test"
65         $(USAGE)
66         $(USAGE)"usage2             - usage on secondary test targets"
67         $(USAGE)"usagetrace         - usage on trace targets"
68         $(USAGE)
69
70 usage2: FORCE
71         $(USAGE)
72         $(USAGE)"TestMakefile Secondary Targets:"
73         $(USAGE)
74         $(USAGE)"The following are run as part of the Primary target test suites and may"
75         $(USAGE)"also be invoked as standalone tests."
76         $(USAGE)
77         $(USAGE)"TestXMLRepository       - Executes poststarttests on XML repository"
78         $(USAGE)"                          built with cimmofl."
79         $(USAGE)"TestXMLRepositoryServer - Executes poststarttests on XML repository" 
80         $(USAGE)"                          built with cimmof."
81         $(USAGE)"TestXMLCmpRepository    - Executes poststarttests on XML compressed"
82         $(USAGE)"                          repository built with cimmofl."
83         $(USAGE)"TestBinRepository       - Executes poststarttests on binary repository "
84         $(USAGE)"                          built with cimmofl."
85         $(USAGE)"TestBinRepositoryServer - Executes poststarttests on binary repository"
86         $(USAGE)"                          built with cimmof."
87         $(USAGE)"TestBinCmpRepository    - Executes poststarttests on binary compressed"
88         $(USAGE)"                          repository built with cimmofl."
89         $(USAGE)
90         $(USAGE)"The following require the repository to be pre-built."
91         $(USAGE)
92         $(USAGE)"run_SSL_TS1             - Executes the SSL tests"
93         $(USAGE)"run_OOP_TS1             - Executes the Out Of Process Provider tests"
94         $(USAGE)
95         $(USAGE)"The following require the repository to be pre-built and the server to be started."
96         $(USAGE)
97         $(USAGE)"serversuite             - the collection of test run by the servertests rule"
98         $(USAGE)"serverquicksuite        - The collection of test run by the serverquicktests rule"
99         $(USAGE)
100
101
102 ##########################################################
103 #
104 # rules that are defined in Makefile
105 #
106 ##########################################################
107
108 build: FORCE
109         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile build
110
111 world: FORCE
112         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile world
113
114 new: FORCE
115         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile new
116
117 clean: FORCE
118         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile clean
119
120 depend: FORCE
121         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile depend
122
123
124 ############################################################
125 #
126 # rules defined here
127 #
128 ############################################################
129
130 ##
131 ## Although the macros CIMSERVER_STOP_SERVICE and CIMSERVER_START_SERVICE
132 ## are available and could be invoked directly, their direct usage is
133 ## discouraged in favor of invoking the cimstop and the cimstart rules
134 ## as this allows one place where additional checks, delays etc may be 
135 ## added in the future to control or further test the servers performance
136 ## in executing these commands.
137 ##
138
139 #######################
140 #
141 # doc
142 #
143 doc:
144         $(MAKE) --directory=$(PEGASUS_ROOT)/doc/ProviderSpec -f Makefile
145         $(MAKE) --directory=$(PEGASUS_ROOT)/doc/DevManual -f Makefile
146
147
148 #######################
149 #
150 # repositoryServer
151 #
152 repositoryServer: FORCE
153         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
154         $(SLEEP) 5
155         $(RMDIRHIER) $(REPOSITORY_ROOT)
156         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart
157         $(SLEEP) 5
158         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer
159         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer
160
161 ######################
162 #
163 # prestarttests is being deprecated since poststarttest is being deprecated
164 # in favor of name more related to its intended functionality. 
165 #
166 prestarttests: prestarttests_msg shortsleep unittests
167
168 prestarttests_msg: FORCE
169         @$(ECHO) "=============================================================================="
170         @$(ECHO) "TestMakefile: The \"prestarttests\" rule is being deprecated."
171         @$(ECHO) "              Use \"make testusage\" for a description of the usage model."   
172         @$(ECHO) "              The equivalent new rule is \"unittests\"."  
173         @$(ECHO) "              Invoking the \"unittests\" rule now."
174         @$(ECHO) "=============================================================================="
175
176 ####################
177 #
178 # poststarttests is being deprecated since it multiply defines a 
179 # recursive make rule leading to ambuguity and confusion.
180 #
181 poststarttests: poststarttests_msg shortsleep servertests 
182
183 poststarttests_msg: FORCE
184         @$(ECHO) "==============================================================================="
185         @$(ECHO) "TestMakefile: The \"posstarttests\" rule is being deprecated.."  
186         @$(ECHO) "              Use \"make testusage\" for a description of the usage model."   
187         @$(ECHO) "              The equivalent new rule is \"servertests\"."  
188         @$(ECHO) "              Invoking the \"servertests\" rule now."
189         @$(ECHO) "==============================================================================="
190
191 #####################
192 #
193 # tests is being deprecated since it multiply defines a 
194 # recursive make rule leading to ambuguity and confusion.
195 #
196 tests: tests_msg shortsleep alltests
197
198 tests_msg: FORCE
199         @$(ECHO) "==================================================================="
200         @$(ECHO) "TestMakefile: The \"tests\" rule is being deprecated."
201         @$(ECHO) "              Use \"make testusage\" for a description of the usage model."   
202         @$(ECHO) "              The equivalent new rule is \"alltests\"."  
203         @$(ECHO) "              Invoking the \"alltests\" rule now."
204         @$(ECHO) "==================================================================="
205
206
207 shortsleep: FORCE
208         @$(SLEEP) 5
209
210 ####################
211 #
212 # unittests
213 #
214 unittests: FORCE
215         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile tests
216         @ $(ECHO) "+++++ TestMakefile unittests complete"
217
218 #####################
219 #
220 # servertests
221 #
222
223 servertestsclean: FORCE
224         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
225         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Pegasus/CQL/tests/Queries -f Makefile clean
226         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Pegasus/Query/QueryExpression/tests/Queries -f Makefile clean
227         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile clean
228
229
230 servertestssetup: FORCE
231         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
232         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
233         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile cimstart
234         $(SLEEP) 5
235
236 servertests: servertestsclean servertestssetup serversuite
237         @ $(ECHO) "+++++ TestMakefile servertests suites complete"
238
239 serversuite: FORCE
240         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests
241         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestBinRepository
242         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOP_TS1
243         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_IndInit_TS1
244         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_SSL_TS1
245
246 ####################
247 #
248 # serverquicktests
249 #
250 serverquicktests: servertestsclean servertestssetup serverquicksuite
251         @ $(ECHO) "+++++ TestMakefile serverquicktests complete"
252
253 serverquicksuite: FORCE
254         $(PEGASUS_HOME)/bin/TestClient
255         $(PEGASUS_HOME)/bin/Client
256         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests
257
258 ####################
259 #
260 # alltests
261 #
262 alltests: unittests servertests
263 ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
264         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
265         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile uninstall
266 endif
267         @ $(ECHO) "+++++ TestMakefile alltests Complete"
268
269 ###############################################################################
270 ##  Test Suite Definitions
271 ###############################################################################
272
273 ###############################################################################
274 ##  OOP Test Suite 1: "Out-of-Process"(OOP) Provider Tests 
275 ##
276 ##  Configuration Options: forceProviderProcesses=true
277 ##
278 ###############################################################################
279 OOP_TS1_CONFIG_OPTIONS = forceProviderProcesses=true
280 OOP_TS1_TEST_CMDS = \
281         TestClient
282
283 run_OOP_TS1:
284         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
285             CIMSERVER_CONFIG_OPTIONS="$(OOP_TS1_CONFIG_OPTIONS)" \
286             TESTSUITE_CMDS="$(OOP_TS1_TEST_CMDS)"
287 ###############################################################################
288
289 ###############################################################################
290 ##  IndInit Test Suite 1: IndicationService Initialization Tests 
291 ##
292 ##  Configuration Options: (none)
293 ##
294 ###############################################################################
295 IndInit_TS1_CONFIG_OPTIONS = 
296 IndInit_TS1a_TEST_CMDS = \
297         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Pegasus/IndicationService/tests/ProcessIndication@@IndInit_TS1a
298 IndInit_TS1b_TEST_CMDS = \
299         $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Pegasus/IndicationService/tests/ProcessIndication@@IndInit_TS1b
300
301 run_IndInit_TS1:
302         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
303             CIMSERVER_CONFIG_OPTIONS="$(IndInit_TS1_CONFIG_OPTIONS)" \
304             TESTSUITE_CMDS="$(IndInit_TS1a_TEST_CMDS)"
305         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
306             CIMSERVER_CONFIG_OPTIONS="$(IndInit_TS1_CONFIG_OPTIONS)" \
307             TESTSUITE_CMDS="$(IndInit_TS1b_TEST_CMDS)"
308
309 ###############################################################################
310 ##  SSL Test Suite 1: SSL Tests
311 ##
312 ##  Configuration Options: enableAuthentication=true
313 ##                         enableHttpsConnection=true
314 ##                         sslClientVerificationMode=optional
315 ##                         sslTrustStoreUserName=$(CURRENT_USER)
316 ##
317 ###############################################################################
318 SSL_TS1_CONFIG_OPTIONS = enableHttpsConnection=true enableAuthentication=true \
319        sslClientVerificationMode=optional sslTrustStoreUserName=$(CURRENT_USER)
320 SSL_TS1_TEST_CMDS = \
321        $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Clients/ssltrustmgr/tests@@SSLCertificateTest1
322
323 ifdef PEGASUS_HAS_SSL
324 run_SSL_TS1: FORCE
325         $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
326             CIMSERVER_CONFIG_OPTIONS="$(SSL_TS1_CONFIG_OPTIONS)" \
327             TESTSUITE_CMDS="$(SSL_TS1_TEST_CMDS)"
328 else
329 run_SSL_TS1: FORCE
330         @ $(ECHO) "PEGASUS_HAS_SSL not defined: Skipping run_SSL_TS1 poststarttest"
331
332 endif
333
334
335 ###############################################################################
336
337
338
339 ##############################################################################
340 ##
341 ## TestXMLRepository rule is used to run the poststarttests suite on
342 ## the XML Repository built using cimmofl
343 ##
344 ## TestXMLRepositoryServer rule is used to run the poststarttests suite on
345 ## the XML Repository built using cimmof
346 ##
347 ## TestXMLCmpRepository rule is used to run the poststarttest suite on 
348 ## the XML Compressed Repository built using cimmofl
349 ##
350
351 ############################
352 ##
353 ## TestXMLRepository
354 ##
355
356 TestXMLRepository: TestXMLClean TestXMLBuildRepo  TestXMLRepo
357         @ $(ECHO) TestXMLRepository +++++ passed all test
358
359 ############################
360 ##
361 ## TestXMLRepositoryServer
362 ##
363 TestXMLRepositoryServer: TestXMLClean  TestXMLBuildRepoServ TestXMLRepo
364         @ $(ECHO) TestXMLRepositoryServer +++++ passed all test
365
366 ############################
367 ##
368 ## TestXMLCmpRepository -  run poststarttest on Compressed BIN Repository
369 ##
370 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY
371 TestXMLCmpRepository: FORCE
372         @ $(ECHO) TestXMLCmpRepository +++++ Repository compressed by default - nothing more to test.
373         @ $(ECHO) TestXMLCmpRepository +++++ passed all test
374 else
375
376 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST
377
378 TestXMLCmpRepository: TestXMLClean  TestCmpBuild TestXMLBuildRepo TestXMLRepo TestRegBuild
379         @ $(ECHO) TestXMLCmpRepository +++++ passed all test
380 else
381 TestXMLCmpRepository: FORCE
382         @ $(ECHO) TestXMLCmpRepository +++++ Not tested 
383         @ $(ECHO) TestXMLCmpRepository +++++ refer to readme.compressed_repository
384         @ $(ECHO) TestXMLCmpRepository +++++ to enable: set PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST=true 
385 endif
386 endif
387
388 ###########################
389 ##
390 ## TestXMLClean
391 ##
392 TestXMLClean: FORCE
393         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop 
394         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryclean REPOSITORY_NAME=repository_xml
395
396
397 ###########################
398 ##
399 ## TestXMLStartServer
400 ##
401 TestXMLStartServer: FORCE
402         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run
403         - $(MKDIRHIER) $(PEGASUS_HOME)/repository_xml
404         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="repositoryDir=$(PEGASUS_HOME)/repository_xml"
405         $(SLEEP) 5
406
407 ####
408 #### The following caused the cimserver to fail on startup
409 ####
410 ####    $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="enableBinRepository=false repositoryDir=$(PEGASUS_HOME)/repository_xml"
411
412 ###########################
413 ##
414 ## TestXMLBuildRepo
415 ##
416 TestXMLBuildRepo: FORCE
417         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
418         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
419
420
421 ###########################
422 ##
423 ## TestXMLBuildRepoServ
424 ##
425 TestXMLBuildRepoServ: TestXMLStartServer
426         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
427         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
428         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop 
429
430
431 ###########################
432 ##
433 ## TestXMLRepo
434 ##
435 TestXMLRepo: servertestsclean
436         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestXMLStartServer
437         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
438         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop 
439
440
441
442
443
444
445 ##############################################################################
446 ##
447 ## TestBinRepository rule is used to run the poststarttests suite on
448 ## the Binary Repository built using cimmofl
449 ##
450 ## TestBinRepositoryServer rule is used to run the poststarttests suite on
451 ## the Binary Repository built using cimmof
452 ##
453 ## TestBinCmpRepository rule is used to run the poststarttest suite on 
454 ## the Binry Compressed Repository built using cimmofl
455 ##
456
457 ############################
458 ##
459 ## TestBinRepository
460 ##
461 ### bug 3011 disabled Binary Repository testing on LINUX_IA64 to allow
462 ### the nightly tests to run
463
464 TestBinRepository: TestBinClean TestBinBuildRepo  TestBinRepo
465         @ $(ECHO) TestBinRepository +++++ passed all test
466
467
468 ############################
469 ##
470 ## TestBinRepositoryServer
471 ##
472 TestBinRepositoryServer: TestBinClean  TestBinBuildRepoServ TestBinRepo
473         @ $(ECHO) TestBinRepositoryServer +++++ passed all test
474
475 ############################
476 ##
477 ## TestBinCmpRepository -  run poststarttest on Compressed BIN Repository
478 ##
479 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY
480 TestBinCmpRepository: FORCE
481         @ $(ECHO) TestBinCmpRepository +++++ Repository compressed by default - nothing more to test.
482         @ $(ECHO) TestBinCmpRepository +++++ passed all test
483 else
484
485 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST
486
487 TestBinCmpRepository: TestBinClean  TestCmpBuild TestBinBuildRepo TestBinRepo TestRegBuild
488         @ $(ECHO) TestBinCmpRepository +++++ passed all test
489 else
490 TestBinCmpRepository: FORCE
491         @ $(ECHO) TestBinCmpRepository +++++ Not tested 
492         @ $(ECHO) TestBinCmpRepository +++++ refer to readme.compressed_repository
493         @ $(ECHO) TestBinCmpRepository +++++ to enable: set PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST=true 
494 endif
495 endif
496
497
498 ###########################
499 ##
500 ## TestBinClean
501 ##
502 TestBinClean: FORCE
503         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop 
504         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryclean REPOSITORY_NAME=repository_bin
505
506
507 ###########################
508 ##
509 ## TestBinStartServer
510 ##
511 TestBinStartServer: FORCE
512         $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run
513         - $(MKDIRHIER) $(PEGASUS_HOME)/repository_bin
514         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="enableBinaryRepository=true repositoryDir=$(PEGASUS_HOME)/repository_bin"
515         $(SLEEP) 5
516
517 ###########################
518 ##
519 ## TestBinBuildRepo
520 ##
521 TestBinBuildRepo: FORCE
522         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
523         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
524
525
526 ###########################
527 ##
528 ## TestBinBuildRepoServ
529 ##
530 TestBinBuildRepoServ: TestBinStartServer
531         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
532         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
533         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop 
534
535
536 ###########################
537 ##
538 ## TestBinRepo
539 ##
540 TestBinRepo: servertestsclean 
541         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestBinStartServer
542         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
543         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop 
544
545
546
547
548 ############################
549 ##
550 ## TestCmpBuild - used to compile the repository for compression
551 ##
552 TestCmpBuild: FORCE
553         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository clean
554         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository depend PEGASUS_ENABLE_COMPRESSED_REPOSITORY=1
555         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository PEGASUS_ENABLE_COMPRESSED_REPOSITORY=1
556
557
558 ############################
559 ##
560 ## TestRegBuild - used to compile the repository for no compression
561 ##
562 TestRegBuild: FORCE
563         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository clean
564         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository depend 
565         @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository 
566
567
568 ###############################################################################
569 ##
570 ## Trace Configuration
571 ##
572 ## Options: see usagetrace rule
573 ##
574 ###############################################################################
575
576 usagetrace: FORCE
577         $(USAGE)
578         $(USAGE)"TestMakefile Trace Commands: (cimserver should be running)"
579         $(USAGE)
580         $(USAGE)
581         $(USAGE)" traceon:                  Enables all tracing."
582         $(USAGE)" traceoff:                 Disables all tracing."
583         $(USAGE)" tracesettings:            Displays trace settings."
584         $(USAGE)" tracecomp:                Displays a trace componenets list."
585         $(USAGE)" traceon-CL C=[comp] L=[level(1,2,3,4)]:  "
586         $(USAGE)"                           Enables tracing on component C at trace level L."
587         $(USAGE)"                           Usage example:"
588         $(USAGE)"                           Turns tracing on for DiscardedData at level 3"
589         $(USAGE)"                           traceon-CL C=DiscardedData L=3"
590         $(USAGE)
591         $(USAGE)
592
593 traceon: FORCE
594         @ cimconfig -s traceComponents=ALL
595         @ cimconfig -s traceLevel=3 -c
596         @ cimconfig -g traceComponents
597         @ cimconfig -g traceLevel
598
599 traceoff: FORCE
600         @ cimconfig -s traceComponents=
601         @ cimconfig -g traceComponents
602         @ cimconfig -g traceLevel
603
604
605 tracesettings: FORCE
606         @ $(ECHO) " "
607         cimconfig -g traceComponents
608         @ $(ECHO) " "
609         cimconfig -g traceLevel
610         @ $(ECHO) " "
611         cimconfig -g traceFilePath
612         @ $(ECHO) " "
613
614 traceon-CL: FORCE
615         @ cimconfig -s traceComponents=$C -c
616         @ cimconfig -s traceLevel=$L -c
617         @ cimconfig -g traceComponents
618         @ cimconfig -g traceLevel
619
620 tracecomp: FORCE
621         $(USAGE)
622         $(USAGE)"Trace component list:"
623         $(USAGE)
624         $(USAGE)"Channel"
625         $(USAGE)"XmlParser"
626         $(USAGE)"XmlWriter"
627         $(USAGE)"XmlReader"
628         $(USAGE)"XmlIO"
629         $(USAGE)"Http"
630         $(USAGE)"CimData"
631         $(USAGE)"ProvManager"
632         $(USAGE)"Repository"
633         $(USAGE)"Dispatcher"
634         $(USAGE)"OsAbstraction"
635         $(USAGE)"Config"
636         $(USAGE)"IndDelivery"
637         $(USAGE)"IndHandler"
638         $(USAGE)"Authentication"
639         $(USAGE)"Authorization"
640         $(USAGE)"UserManager"
641         $(USAGE)"SubscriptionService"
642         $(USAGE)"Registration"
643         $(USAGE)"Shutdown"
644         $(USAGE)"Server"
645         $(USAGE)"IndicationService"
646         $(USAGE)"IndicationServiceInternal"
647         $(USAGE)"ConfigurationManager"
648         $(USAGE)"MessageQueueService"
649         $(USAGE)"ProviderManager"
650         $(USAGE)"ObjectResolution"
651         $(USAGE)"WQL"
652         $(USAGE)"CQL"
653         $(USAGE)"Thread"
654         $(USAGE)"MetaDispatcher"
655         $(USAGE)"IPC"
656         $(USAGE)"IndicationHandlerService"
657         $(USAGE)"CIMExportRequestDispatcher"
658         $(USAGE)"Memory"
659         $(USAGE)"SSL"
660         $(USAGE)"ControlProvider"
661         $(USAGE)"AsyncOpNode"
662         $(USAGE)"CIMOMHandle"
663         $(USAGE)"BinaryMessageHandler"
664         $(USAGE)"L10N"
665         $(USAGE)"ExportClient"
666         $(USAGE)"Listener"
667         $(USAGE)"DiscardedData"
668         $(USAGE)"ProviderAgent"
669         $(USAGE)
670
671 ###############################################################################
672 ##
673 ## Trace Configuration - Old rules being deprecated
674 ##
675 ## Options:
676 ##      XMLTraceOn: Enables XML request and response tracing.
677 ##      ProviderLoadTraceOn: Enables Provider load tracing.
678 ##      XML+ProviderLoadTraceOn: Enables both XML request/response and Provider
679 ##                                 load tracing.
680 ##      AllTraceOn: Enables all tracing.
681 ##      AllTraceOff: Disables all tracing.
682 ##      list: Lists trace settings.
683 ##
684 ###############################################################################
685
686 XMLTraceOn:
687         cimconfig -s traceComponents=XmlIO -c
688         cimconfig -s traceLevel=3 -c
689         cimconfig -g traceComponents
690         cimconfig -g traceLevel
691
692 ProviderLoadTraceOn:
693         cimconfig -s traceComponents=ProvManager,OsAbstraction
694         cimconfig -s traceLevel=3 -c
695         cimconfig -g traceComponents
696         cimconfig -g traceLevel
697
698 XML+ProviderLoadTraceOn:
699         cimconfig -s traceComponents=XmlIO,ProvManager,OsAbstraction
700         cimconfig -s traceLevel=3 -c
701         cimconfig -g traceComponents
702         cimconfig -g traceLevel
703
704 AllTraceOn: traceon
705
706 AllTraceOff: traceoff
707
708 list: tracesettings
709
710
711 # More options...
712
713 standardtests: FORCE
714         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i DisableSecurity
715         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestCimmof
716         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestNoSecurity
717         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile EnableAuthentication
718         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestLocalSecurity
719         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestRemoteSecurity
720         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile EnableAuthorization
721         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestAuthorization
722         @ $(ECHO) "+++++ TestMakefile standardtests complete"
723
724 TestNoSecurity:
725         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile tests
726         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
727         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile RunTestClientLocal
728
729 TestLocalSecurity:
730         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile RunTestClientLocal
731         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests HOSTNAME= PORT= USER= PASSWORD= SECURITY_ENABLED=true
732
733 TestRemoteSecurity:
734         TestClient -user guest -password guest $(system):5988
735         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/static -f Makefile poststarttests HOSTNAME=-h$(system) USER=-uguest PASSWORD=-wguest SECURITY_ENABLED=true
736
737 TestAuthorization:
738         DeleteNamespace -a -user guest -password guest
739         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile RunTestClientLocal
740         TestClient -user guest -password guest $(system):5988
741         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/static -f Makefile poststarttests HOSTNAME=-h$(system) USER=-uguest PASSWORD=-wguest SECURITY_ENABLED=true
742
743 TestSubscriptions:
744         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile DisableSecurity
745         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
746         $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
747         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
748         $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/cimv2/Subscription -f Makefile poststarttests
749         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile cimstop
750
751 TestCimmof:
752         $(MAKE) --directory=$(PEGASUS_ROOT) -f Testcimmof poststarttests
753
754 RunTestClientLocal:
755         TestClient -local
756
757 DisableSecurity:
758         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
759         cimconfig -s enableAuthentication=false -p
760         cimconfig -s enableNamespaceAuthorization=false -p
761
762 EnableAuthentication:
763         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
764         cimconfig -s enableAuthentication=true -p
765         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
766         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile ConfigureUsers
767
768 EnableAuthorization:
769         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
770         cimconfig -s enableNamespaceAuthorization=true -p
771         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
772         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i ConfigureAuthorizations
773
774 EnableSSL:
775         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
776         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithSSL
777
778 ConfigureUsers:
779 ifndef PEGASUS_PAM_AUTHENTICATION
780         cimuser -a -u guest -w guest
781 endif
782
783 ConfigureAuthorizations:
784         cimauth -a -u guest -n test/cimv2 -R -W
785         cimauth -a -u guest -n root/cimv2 -R -W
786         cimauth -a -u guest -n root/PG_Internal -R -W
787         cimauth -a -u guest -n root/PG_InterOp -R -W
788         cimauth -a -u guest -n root/benchmark -R -W
789         cimauth -a -u guest -n root/sampleprovider -R -W
790         cimauth -a -u guest -n test/static -R -W
791         cimauth -a -u guest -n root/SampleProvider -R -W
792         cimauth -a -u guest -n root -R -W
793         cimauth -a -u guest -n test1 -R -W
794         cimauth -a -u guest -n test2 -R -W
795         cimauth -a -u guest -n test3 -R -W
796         cimauth -a -u guest -n test4 -R -W
797         cimauth -a -u guest -n test5 -R -W
798         cimauth -a -u guest -n test6 -R -W
799         cimauth -a -u guest -n test1/test2 -R -W
800         cimauth -a -u guest -n test1/test2/test3 -R -W
801         cimauth -a -u guest -n test1/test2/test3/test4 -R -W
802         cimauth -a -u guest -n test1/test2/test3/test4/test5 -R -W
803         cimauth -a -u guest -n test1/test2/test3/test4/test5/test6 -R -W
804
805 startcimWithoutSSL: FORCE
806         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart
807         $(SLEEP) 5
808
809 startcimWithSSL: FORCE
810         $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="enableHttpConnection=false enableHttpsConnection=true"
811         $(SLEEP) 5