1 #//%2006////////////////////////////////////////////////////////////////////////
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.
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:
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.
30 #//==============================================================================
31 ###############################################################################
33 ## Test Makefile for Pegasus CIMOM
35 ## see the usage rule for documentation of rules etc.
38 ###############################################################################
41 @ $(ECHO) "Specify desired makefile option (i.e., unittests, usage )"
43 include $(PEGASUS_ROOT)/mak/config.mak
44 include $(PEGASUS_ROOT)/mak/test.mak
45 include $(PEGASUS_ROOT)/mak/commands.mak
55 $(USAGE)"TestMakefile Primary Targets:"
57 $(USAGE)"The following are all standalone tests. They stop and start the server,"
58 $(USAGE)"and build repositories as needed."
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"
69 $(USAGE)"usage2 - usage on secondary test targets"
70 $(USAGE)"usagetrace - usage on trace targets"
75 $(USAGE)"TestMakefile Secondary Targets:"
77 $(USAGE)"The following are run as part of the Primary target test suites and may"
78 $(USAGE)"also be invoked as standalone tests."
80 $(USAGE)"TestXMLRepository - Executes poststarttests on XML repository"
81 $(USAGE)" built with cimmofl."
82 $(USAGE)"TestXMLRepositoryServer - Executes poststarttests on XML repository"
83 $(USAGE)" built with cimmof."
84 $(USAGE)"TestXMLCmpRepository - Executes poststarttests on XML compressed"
85 $(USAGE)" repository built with cimmofl."
86 $(USAGE)"TestBinRepository - Executes poststarttests on binary repository "
87 $(USAGE)" built with cimmofl."
88 $(USAGE)"TestBinRepositoryServer - Executes poststarttests on binary repository"
89 $(USAGE)" built with cimmof."
90 $(USAGE)"TestBinCmpRepository - Executes poststarttests on binary compressed"
91 $(USAGE)" repository built with cimmofl."
93 $(USAGE)"The following require the repository to be pre-built."
95 $(USAGE)"run_SSL_TS1 - Executes the SSL tests"
96 $(USAGE)"run_OOP_TS1 - Executes the Out Of Process Provider tests"
97 $(USAGE)"run_G11N_TS1 - Executes the Globalization tests"
99 $(USAGE)"The following require the repository to be pre-built and the server to be started."
101 $(USAGE)"serversuite - the collection of test run by the servertests rule"
102 $(USAGE)"serverquicksuite - The collection of test run by the serverquicktests rule"
106 ##########################################################
108 # rules that are defined in Makefile
110 ##########################################################
113 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile build
116 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile world
119 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile new
122 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile clean
125 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile depend
128 ############################################################
132 ############################################################
135 ## Although the macros CIMSERVER_STOP_SERVICE and CIMSERVER_START_SERVICE
136 ## are available and could be invoked directly, their direct usage is
137 ## discouraged in favor of invoking the cimstop and the cimstart rules
138 ## as this allows one place where additional checks, delays etc may be
139 ## added in the future to control or further test the servers performance
140 ## in executing these commands.
143 #######################
148 $(MAKE) --directory=$(PEGASUS_ROOT)/doc/ProviderSpec -f Makefile
149 $(MAKE) --directory=$(PEGASUS_ROOT)/doc/DevManual -f Makefile
152 #######################
156 repositoryServer: FORCE
157 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
159 $(RMDIRHIER) $(REPOSITORY_ROOT)
160 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart
162 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer
163 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer
165 ######################
167 # prestarttests is being deprecated since poststarttest is being deprecated
168 # in favor of name more related to its intended functionality.
170 prestarttests: prestarttests_msg shortsleep unittests
172 prestarttests_msg: FORCE
173 @$(ECHO) "=============================================================================="
174 @$(ECHO) "TestMakefile: The \"prestarttests\" rule is being deprecated."
175 @$(ECHO) " Use \"make testusage\" for a description of the usage model."
176 @$(ECHO) " The equivalent new rule is \"unittests\"."
177 @$(ECHO) " Invoking the \"unittests\" rule now."
178 @$(ECHO) "=============================================================================="
182 # poststarttests is being deprecated since it multiply defines a
183 # recursive make rule leading to ambuguity and confusion.
185 poststarttests: poststarttests_msg shortsleep servertests
187 poststarttests_msg: FORCE
188 @$(ECHO) "==============================================================================="
189 @$(ECHO) "TestMakefile: The \"posstarttests\" rule is being deprecated.."
190 @$(ECHO) " Use \"make testusage\" for a description of the usage model."
191 @$(ECHO) " The equivalent new rule is \"servertests\"."
192 @$(ECHO) " Invoking the \"servertests\" rule now."
193 @$(ECHO) "==============================================================================="
195 #####################
197 # tests is being deprecated since it multiply defines a
198 # recursive make rule leading to ambuguity and confusion.
200 tests: tests_msg shortsleep alltests
203 @$(ECHO) "==================================================================="
204 @$(ECHO) "TestMakefile: The \"tests\" rule is being deprecated."
205 @$(ECHO) " Use \"make testusage\" for a description of the usage model."
206 @$(ECHO) " The equivalent new rule is \"alltests\"."
207 @$(ECHO) " Invoking the \"alltests\" rule now."
208 @$(ECHO) "==================================================================="
219 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile tests
220 @ $(ECHO) "+++++ TestMakefile unittests complete"
222 #####################
227 servertestsclean: FORCE
228 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
229 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Pegasus/CQL/tests/Queries -f Makefile clean
230 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Pegasus/Query/QueryExpression/tests/Queries -f Makefile clean
231 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile clean
233 servertestssetup: FORCE
234 ifdef PEGASUS_HAS_SSL
236 # The association between user names and certificates is stored in the
237 # repository. If the repository is recreated, we also need to re-initialize
238 # the trust store directories. Otherwise, the truststore content will be
239 # out-of-sync with the mapping stored in the repository.
241 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile removeSSLTrustDirectories
242 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile createSSLTrustDirectories
244 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
245 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
246 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile cimstart
248 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile ConfigureUsers
249 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile Create_SSL_Certificate
252 servertests: servertestsclean servertestssetup serversuite
253 @ $(ECHO) "+++++ TestMakefile servertests suites complete"
256 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests
257 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestBinRepository
258 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_OOP_TS1
259 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_IndInit_TS1
260 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_INDSSL_TS1
261 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_SSL_TS1
262 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile run_G11N_TS1
268 serverquicktests: servertestsclean servertestssetup serverquicksuite
269 @ $(ECHO) "+++++ TestMakefile serverquicktests complete"
271 serverquicksuite: FORCE
272 $(PEGASUS_HOME)/bin/Client
273 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests
274 $(PEGASUS_HOME)/bin/TestClient
278 # perftests - simple performance test until we have better
280 # - Turns statistics on (uses TestInterop until we have better)
281 # - runs and times serverquicktests suite
282 # - runs cimperf to displat the statistics
283 # - turns statistics off
285 perftests: servertestsclean servertestssetup perfsuite
288 $(PEGASUS_HOME)/bin/TestInterop on
289 $(TIME_CMD) $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests
291 $(TIME_CMD) $(PEGASUS_HOME)/bin/TestClient
293 $(TIME_CMD) $(PEGASUS_HOME)/bin/benchmarkTest
296 $(TIME_CMD) $(PEGASUS_HOME)/bin/cimperf
298 $(PEGASUS_HOME)/bin/TestInterop off
305 alltests: unittests servertests
306 ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
307 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
308 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile uninstall
310 @ $(ECHO) "+++++ TestMakefile alltests Complete"
312 ###############################################################################
313 ## Test Suite Definitions
314 ###############################################################################
316 ###############################################################################
317 ## OOP Test Suite 1: "Out-of-Process"(OOP) Provider Tests
319 ## Configuration Options: forceProviderProcesses=true
321 ## If PEGASUS_DEFAULT_ENABLE_OOP is set, then tests are run with OOP disabled
322 ## since tests have already been run with OOP enabled.
325 ###############################################################################
326 ifeq ($(PEGASUS_DEFAULT_ENABLE_OOP),true)
327 OOP_TS1_CONFIG_OPTIONS = forceProviderProcesses=false
329 OOP_TS1_CONFIG_OPTIONS = forceProviderProcesses=true
332 OOP_TS1_TEST_CMDS = \
333 $(MAKE)@@--directory=$(PEGASUS_ROOT)@@Makefile@@-s@@poststarttests
336 $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
337 CIMSERVER_CONFIG_OPTIONS="$(OOP_TS1_CONFIG_OPTIONS)" \
338 TESTSUITE_CMDS="$(OOP_TS1_TEST_CMDS)"
340 ###############################################################################
342 ###############################################################################
343 ## IndInit Test Suite 1: IndicationService Initialization Tests
345 ## Configuration Options: (none)
347 ###############################################################################
348 IndInit_TS1_CONFIG_OPTIONS =
349 IndInit_TS1a_TEST_CMDS = \
350 $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Pegasus/IndicationService/tests/ProcessIndication@@IndInit_TS1a
351 IndInit_TS1b_TEST_CMDS = \
352 $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Pegasus/IndicationService/tests/ProcessIndication@@IndInit_TS1b
355 $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
356 CIMSERVER_CONFIG_OPTIONS="$(IndInit_TS1_CONFIG_OPTIONS)" \
357 TESTSUITE_CMDS="$(IndInit_TS1a_TEST_CMDS)"
358 $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
359 CIMSERVER_CONFIG_OPTIONS="$(IndInit_TS1_CONFIG_OPTIONS)" \
360 TESTSUITE_CMDS="$(IndInit_TS1b_TEST_CMDS)"
362 ###############################################################################
363 ## Indication SSL Test Suite 1: Indication Testing over HTTPS
365 ## Configuration Options: (none)
367 ###############################################################################
368 INDSSL_TS1a_CONFIG_OPTIONS = enableHttpsConnection=true enableAuthentication=false
369 INDSSL_TS1a_TEST_CMDS = \
370 $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/IndicationStressTestProvider/testclient@@-f@@Makefile@@run_TS1_AuthenticationDisabled
372 INDSSL_TS1b_CONFIG_OPTIONS = enableHttpsConnection=true enableAuthentication=true sslClientVerificationMode=required
373 INDSSL_TS1b_TEST_CMDS = \
374 $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Providers/TestProviders/IndicationStressTestProvider/testclient@@-f@@Makefile@@run_TS1_AuthenticationEnabled
377 ifdef PEGASUS_HAS_SSL
378 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
379 run_INDSSL_TS1: EnableUsers Create_SSL_Certificate_ignore
380 $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
381 CIMSERVER_CONFIG_OPTIONS="$(INDSSL_TS1a_CONFIG_OPTIONS)" \
382 TESTSUITE_CMDS="$(INDSSL_TS1a_TEST_CMDS)"
383 $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
384 CIMSERVER_CONFIG_OPTIONS="$(INDSSL_TS1b_CONFIG_OPTIONS)" \
385 TESTSUITE_CMDS="$(INDSSL_TS1b_TEST_CMDS)"
387 run_INDSSL_TS1: FORCE
388 @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping run_INDSSL_TS1"
391 run_INDSSL_TS1: FORCE
392 @ $(ECHO) "+++++ PEGASUS_HAS_SSL not defined: Skipping run_INDSSL_TS1"
396 ###############################################################################
398 ###############################################################################
399 ## SSL Test Suite 1: SSL Tests
401 ## Configuration Options: enableAuthentication=true
402 ## enableHttpsConnection=true
403 ## sslClientVerificationMode=optional
404 ## sslTrustStoreUserName=$(CURRENT_USER)
406 ###############################################################################
407 SSL_TS1_CONFIG_OPTIONS = enableHttpsConnection=true enableAuthentication=true \
408 sslClientVerificationMode=optional sslTrustStoreUserName=$(CURRENT_USER)
409 SSL_TS1_TEST_CMDS = \
410 $(MAKE)@@--directory=$(PEGASUS_ROOT)/src/Clients/ssltrustmgr/tests@@SSLCertificateTest1
412 ifdef PEGASUS_HAS_SSL
413 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
415 $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
416 CIMSERVER_CONFIG_OPTIONS="$(SSL_TS1_CONFIG_OPTIONS)" \
417 TESTSUITE_CMDS="$(SSL_TS1_TEST_CMDS)"
420 @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping run_SSL_TS1"
424 @ $(ECHO) "+++++ PEGASUS_HAS_SSL not defined: Skipping run_SSL_TS1 poststarttest"
428 ############################################################################
430 # Create_SSL_Certificate
432 # create a certificate that can be used for certification testing.
433 # It is currently used by the following tests:
436 Create_SSL_Certificate_ignore: FORCE
437 -$(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile Create_SSL_Certificate
439 Create_SSL_Certificate: FORCE
440 ifdef PEGASUS_HAS_SSL
441 ifdef PEGASUS_TEST_USER_DEFINED
442 $(ECHO) "Creating SSL certificate for test"
443 ssltrustmgr -a -c pegtest -f $(PEGASUS_HOME)/server.pem
446 $(ECHO) "PEGASUS_HAS_SSL not defined - Not Creating SSL certificate for test"
449 ###############################################################################
450 ## G11N Test Suite 1: Globalization Tests
452 ## Configuration Options: forceProviderProcesses=false
454 ###############################################################################
455 G11N_TS1_CONFIG_OPTIONS = forceProviderProcesses=false
456 G11N_TS1_TEST_CMDS = \
457 $(MAKE) --directory $(PEGASUS_ROOT)/src/Clients/g11ntest \
461 $(MAKE) -f $(PEGASUS_ROOT)/TestMakefile runTestSuite \
462 CIMSERVER_CONFIG_OPTIONS="$(G11N_TS1_CONFIG_OPTIONS)" \
463 TESTSUITE_CMDS="$(G11N_TS1_TEST_CMDS)"
464 ###############################################################################
467 ###############################################################################
471 ##############################################################################
473 ## TestXMLRepository rule is used to run the poststarttests suite on
474 ## the XML Repository built using cimmofl
476 ## TestXMLRepositoryServer rule is used to run the poststarttests suite on
477 ## the XML Repository built using cimmof
479 ## TestXMLCmpRepository rule is used to run the poststarttest suite on
480 ## the XML Compressed Repository built using cimmofl
483 ############################
488 TestXMLRepository: TestXMLClean TestXMLBuildRepo TestXMLRepo
489 @ $(ECHO) TestXMLRepository +++++ passed all test
491 ############################
493 ## TestXMLRepositoryServer
495 TestXMLRepositoryServer: TestXMLClean TestXMLBuildRepoServ TestXMLRepo
496 @ $(ECHO) TestXMLRepositoryServer +++++ passed all test
498 ############################
500 ## TestXMLCmpRepository - run poststarttest on Compressed BIN Repository
502 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY
503 TestXMLCmpRepository: FORCE
504 @ $(ECHO) TestXMLCmpRepository +++++ Repository compressed by default - nothing more to test.
505 @ $(ECHO) TestXMLCmpRepository +++++ passed all test
508 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST
510 TestXMLCmpRepository: TestXMLClean TestCmpBuild TestXMLBuildRepo TestXMLRepo TestRegBuild
511 @ $(ECHO) TestXMLCmpRepository +++++ passed all test
513 TestXMLCmpRepository: FORCE
514 @ $(ECHO) TestXMLCmpRepository +++++ Not tested
515 @ $(ECHO) TestXMLCmpRepository +++++ refer to readme.compressed_repository
516 @ $(ECHO) TestXMLCmpRepository +++++ to enable: set PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST=true
520 ###########################
525 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
526 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryclean REPOSITORY_NAME=repository_xml
529 ###########################
531 ## TestXMLStartServer
533 TestXMLStartServer: FORCE
534 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run
535 - $(MKDIRHIER) $(PEGASUS_HOME)/repository_xml
536 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="repositoryDir=$(PEGASUS_HOME)/repository_xml"
540 #### The following caused the cimserver to fail on startup
542 #### $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="enableBinRepository=false repositoryDir=$(PEGASUS_HOME)/repository_xml"
544 ###########################
548 TestXMLBuildRepo: FORCE
549 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
550 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
553 ###########################
555 ## TestXMLBuildRepoServ
557 TestXMLBuildRepoServ: TestXMLStartServer
558 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
559 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
560 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
563 ###########################
567 TestXMLRepo: servertestsclean
568 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestXMLStartServer
569 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests REPOSITORY_NAME=repository_xml REPOSITORY_MODE=XML
570 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
577 ##############################################################################
579 ## TestBinRepository rule is used to run the poststarttests suite on
580 ## the Binary Repository built using cimmofl
582 ## TestBinRepositoryServer rule is used to run the poststarttests suite on
583 ## the Binary Repository built using cimmof
585 ## TestBinCmpRepository rule is used to run the poststarttest suite on
586 ## the Binry Compressed Repository built using cimmofl
589 ############################
593 ### bug 3011 disabled Binary Repository testing on LINUX_IA64 to allow
594 ### the nightly tests to run
596 TestBinRepository: TestBinClean TestBinBuildRepo TestBinRepo
597 @ $(ECHO) TestBinRepository +++++ passed all test
600 ############################
602 ## TestBinRepositoryServer
604 TestBinRepositoryServer: TestBinClean TestBinBuildRepoServ TestBinRepo
605 @ $(ECHO) TestBinRepositoryServer +++++ passed all test
607 ############################
609 ## TestBinCmpRepository - run poststarttest on Compressed BIN Repository
611 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY
612 TestBinCmpRepository: FORCE
613 @ $(ECHO) TestBinCmpRepository +++++ Repository compressed by default - nothing more to test.
614 @ $(ECHO) TestBinCmpRepository +++++ passed all test
617 ifdef PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST
619 TestBinCmpRepository: TestBinClean TestCmpBuild TestBinBuildRepo TestBinRepo TestRegBuild
620 @ $(ECHO) TestBinCmpRepository +++++ passed all test
622 TestBinCmpRepository: FORCE
623 @ $(ECHO) TestBinCmpRepository +++++ Not tested
624 @ $(ECHO) TestBinCmpRepository +++++ refer to readme.compressed_repository
625 @ $(ECHO) TestBinCmpRepository +++++ to enable: set PEGASUS_ENABLE_COMPRESSED_REPOSITORY_TEST=true
630 ###########################
635 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
636 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryclean REPOSITORY_NAME=repository_bin
639 ###########################
641 ## TestBinStartServer
643 TestBinStartServer: FORCE
644 $(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run
645 - $(MKDIRHIER) $(PEGASUS_HOME)/repository_bin
646 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="enableBinaryRepository=true repositoryDir=$(PEGASUS_HOME)/repository_bin"
649 ###########################
653 TestBinBuildRepo: FORCE
654 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
655 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
658 ###########################
660 ## TestBinBuildRepoServ
662 TestBinBuildRepoServ: TestBinStartServer
663 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
664 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
665 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
668 ###########################
672 TestBinRepo: servertestsclean
673 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestBinStartServer
674 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests REPOSITORY_NAME=repository_bin REPOSITORY_MODE=BIN
675 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
680 ############################
682 ## TestCmpBuild - used to compile the repository for compression
685 @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository clean
686 @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository depend PEGASUS_ENABLE_COMPRESSED_REPOSITORY=1
687 @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository PEGASUS_ENABLE_COMPRESSED_REPOSITORY=1
690 ############################
692 ## TestRegBuild - used to compile the repository for no compression
695 @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository clean
696 @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository depend
697 @ $(MAKE) "-SC" $(ROOT)/src/Pegasus/Repository
700 ###############################################################################
702 ## Trace Configuration
704 ## Options: see usagetrace rule
706 ###############################################################################
710 $(USAGE)"TestMakefile Trace Commands: "
711 $(USAGE)" The cimserver must be running when using W=c which is the default for W"
713 $(USAGE)" traceon W=[current/planned(c,p): Enables all tracing."
714 $(USAGE)" traceoff W=[current/planned(c,p): Disables all tracing."
715 $(USAGE)" tracesettings: Displays all trace settings."
716 $(USAGE)" tracecomp: Displays a trace componenets list."
717 $(USAGE)" traceon-CL C=[comp] L=[level(1,2,3,4)] W=[current/planned(c,p): "
718 $(USAGE)" Enables tracing on component C at trace level L."
720 $(USAGE)" W defaults to c in the above commands where W can be specified"
722 $(USAGE)" Usage examples:"
723 $(USAGE)" traceon turns on trace in current server config"
724 $(USAGE)" traceon W=c turns on trace in current server config"
725 $(USAGE)" traceon W=p turns on trace in planned server config"
726 $(USAGE)" traceoff turns on trace in current server config"
727 $(USAGE)" traceoff W=c turns on trace in current server config"
728 $(USAGE)" traceoff W=p turns on trace in planned server config"
730 $(USAGE)" traceon-CL C=DiscardedData L=3 W=c"
731 $(USAGE)" Turns on trace for DiscardedData at level 3 in current server config"
732 $(USAGE)" traceon-CL C=DiscardedData L=3 W=p"
733 $(USAGE)" Turns on trace for DiscardedData at level 3 in planned server config"
738 @ cimconfig -s traceComponents=ALL -$W
739 @ cimconfig -s traceLevel=3 -$W
740 $(MAKE) -f $(ROOT)/TestMakefile tracesettings
744 @ cimconfig -s traceComponents= -$W
745 $(MAKE) -f $(ROOT)/TestMakefile tracesettings
750 cimconfig -g traceComponents -c -p
752 cimconfig -g traceLevel -c -p
754 cimconfig -g traceFilePath -c -p
758 @ cimconfig -s traceComponents=$C -$W
759 @ cimconfig -s traceLevel=$L -$W
760 $(MAKE) -f $(ROOT)/TestMakefile tracesettings
764 $(USAGE)"Trace component list:"
773 $(USAGE)"ProvManager"
776 $(USAGE)"OsAbstraction"
778 $(USAGE)"IndDelivery"
780 $(USAGE)"Authentication"
781 $(USAGE)"Authorization"
782 $(USAGE)"UserManager"
783 $(USAGE)"SubscriptionService"
784 $(USAGE)"Registration"
787 $(USAGE)"IndicationService"
788 $(USAGE)"IndicationServiceInternal"
789 $(USAGE)"ConfigurationManager"
790 $(USAGE)"MessageQueueService"
791 $(USAGE)"ProviderManager"
792 $(USAGE)"ObjectResolution"
796 $(USAGE)"MetaDispatcher"
798 $(USAGE)"IndicationHandlerService"
799 $(USAGE)"CIMExportRequestDispatcher"
802 $(USAGE)"ControlProvider"
803 $(USAGE)"AsyncOpNode"
804 $(USAGE)"CIMOMHandle"
805 $(USAGE)"BinaryMessageHandler"
807 $(USAGE)"ExportClient"
809 $(USAGE)"DiscardedData"
810 $(USAGE)"ProviderAgent"
813 ###############################################################################
815 ## Trace Configuration - Old rules being deprecated
818 ## XMLTraceOn: Enables XML request and response tracing.
819 ## ProviderLoadTraceOn: Enables Provider load tracing.
820 ## XML+ProviderLoadTraceOn: Enables both XML request/response and Provider
822 ## AllTraceOn: Enables all tracing.
823 ## AllTraceOff: Disables all tracing.
824 ## list: Lists trace settings.
826 ###############################################################################
829 cimconfig -s traceComponents=XmlIO -c
830 cimconfig -s traceLevel=3 -c
831 cimconfig -g traceComponents
832 cimconfig -g traceLevel
835 cimconfig -s traceComponents=ProvManager,OsAbstraction
836 cimconfig -s traceLevel=3 -c
837 cimconfig -g traceComponents
838 cimconfig -g traceLevel
840 XML+ProviderLoadTraceOn:
841 cimconfig -s traceComponents=XmlIO,ProvManager,OsAbstraction
842 cimconfig -s traceLevel=3 -c
843 cimconfig -g traceComponents
844 cimconfig -g traceLevel
848 AllTraceOff: traceoff
852 #########################################################################
855 # More testing options...
857 # The standard test seem to contain additional test that may not be able
858 # to run on all platforms so they have been grouped here for now rather than
859 # being included in the serversuite rule.
868 # NOTE: The TestsNoSecurity test is comprised of DisableSecurity and
871 # NOTE: The TestNoSecurity step runs the servertests which builds the
872 # the repository that is then left in place for the remaining tests.
873 # The cimof test must be before the TestNosecurity step as it removes
874 # the repository builds a new one with cimmofl and another one with
875 # cimmof and then compares them.
877 # NOTE: The Authentication test is comprised of EnableAuthentication,
878 # TestLocalSecurity and TestRemoteSecurity.
880 # NOTE: The Authorization test is comprised of EnableAuthorization and
883 # NOTE: The EnableAuthentication and EnableAuthorization steps require
884 # root access. Pegasus doesn't currently have the infrastructure
885 # in place to run the server as root and run the test as non-root.
886 # Rather than run everything, server, tests, providers, clients etc.
887 # as root many testers prefer to run the tests as non-root. Setting
888 # PEGASUS_DISABLE_PRIVILEGED_TESTS in the environment helps to
893 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i DisableSecurity
894 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestCimmof
895 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestNoSecurity
896 ifndef PEGASUS_DISABLE_PRIVILEGED_TESTS
897 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile EnableAuthentication
898 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestLocalSecurity
899 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestRemoteSecurity
900 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile EnableAuthorization
901 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile TestAuthorization
903 @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping EnableAuthentication, TestLocalSecurity, and TestRemoteSecurity "
904 @ $(ECHO) "+++++ PEGASUS_DISABLE_PRIVILEGED_TESTS defined: Skipping EnableAuthorization and TestAuthorization "
906 @ $(ECHO) "+++++ TestMakefile standardtests complete"
909 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile servertests
910 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
911 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile RunTestClientLocal
914 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile RunTestClientLocal
915 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile poststarttests HOSTNAME= PORT= USER= PASSWORD= SECURITY_ENABLED=true
918 TestClient -user $(PEGASUS_TEST_USER_ID) -password $(PEGASUS_TEST_USER_PASS) $(system):5988
919 $(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
922 TestPegClientDeleteNamespace -a -user $(PEGASUS_TEST_USER_ID) -password $(PEGASUS_TEST_USER_PASS)
923 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile RunTestClientLocal
924 TestClient -user $(PEGASUS_TEST_USER_ID) -password $(PEGASUS_TEST_USER_PASS) $(system):5988
925 $(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
928 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile DisableSecurity
929 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
930 $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
931 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
932 $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest/cimv2/Subscription -f Makefile poststarttests
933 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile cimstop
936 $(MAKE) --directory=$(PEGASUS_ROOT) -f Testcimmof poststarttests
942 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
943 cimconfig -s enableAuthentication=false -p
944 cimconfig -s enableNamespaceAuthorization=false -p
947 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
948 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
949 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile ConfigureUsers
951 EnableAuthentication:
952 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
953 cimconfig -s enableAuthentication=true -p
954 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
955 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile ConfigureUsers
958 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
959 cimconfig -s enableNamespaceAuthorization=true -p
960 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithoutSSL
961 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i ConfigureAuthorizations
964 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstop
965 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile startcimWithSSL
970 # The server must be running prior to invoking this rule
973 ifndef PEGASUS_PAM_AUTHENTICATION
975 -cimuser -a -u $(PEGASUS_TEST_USER_ID) -w $(PEGASUS_TEST_USER_PASS)
979 # ConfigureAuthorizations rule
981 # The server must be running prior to invoking this rule
983 ConfigureAuthorizations:
984 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test/cimv2 -R -W
985 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/cimv2 -R -W
986 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/PG_Internal -R -W
987 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/PG_InterOp -R -W
988 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/benchmark -R -W
989 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/sampleprovider -R -W
990 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test/static -R -W
991 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root/SampleProvider -R -W
992 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n root -R -W
993 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1 -R -W
994 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test2 -R -W
995 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test3 -R -W
996 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test4 -R -W
997 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test5 -R -W
998 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test6 -R -W
999 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2 -R -W
1000 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2/test3 -R -W
1001 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2/test3/test4 -R -W
1002 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2/test3/test4/test5 -R -W
1003 cimauth -a -u $(PEGASUS_TEST_USER_ID) -n test1/test2/test3/test4/test5/test6 -R -W
1005 startcimWithoutSSL: FORCE
1006 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart
1009 startcimWithSSL: FORCE
1010 $(MAKE) --directory=$(PEGASUS_ROOT) -f TestMakefile -i cimstart CIMSERVER_CONFIG_OPTIONS="enableHttpConnection=false enableHttpsConnection=true"