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