BUG#: 2713
authorkumpf <kumpf>
Fri, 11 Feb 2005 00:22:15 +0000 (00:22 +0000)
committerkumpf <kumpf>
Fri, 11 Feb 2005 00:22:15 +0000 (00:22 +0000)
TITLE: Duplication in Makefiles

DESCRIPTION: Removed redundant Makefile target and command definitions.

TestMakefile
mak/BuildMakefile
mak/test.mak
src/Clients/benchmarkTest/Load/Makefile

index 9e1197f15fc40504f767868dbefd3fe03d23eeba..b3cd9ff1fdb6ba31de4a0fdea1b100760c667f55 100644 (file)
@@ -1,5 +1,6 @@
 include $(PEGASUS_ROOT)/mak/config.mak
 include $(PEGASUS_ROOT)/mak/test.mak
+include $(PEGASUS_ROOT)/mak/commands.mak
 
 system = localhost
 
@@ -18,57 +19,14 @@ system = localhost
 ##
 ###############################################################################
 
-###############################################################################
-##
-## Platform specific settings for several platforms.
-##
-## NOTE: Please add platform specific environment variables as appropriate.
-##
-###############################################################################
-
-ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
-    CIMSERVER_START_SERVICE = cimserver -start
-    CIMSERVER_STOP_SERVICE = cimserver -stop
-    SLEEP = mu sleep 5
-    REMOVE_PEGASUS_DIRECTORY = mu rmdirhier pegasus
-    MUEXE = mu.exe
-    MKDIR = $(MUEXE) mkdirhier
-    TESTS = prestarttests poststarttests
-endif
-
-ifeq ($(PEGASUS_PLATFORM),DARWIN_PPC_GNU)
-    CIMSERVER_START_SERVICE = cimserver
-    CIMSERVER_STOP_SERVICE = cimserver -s; true
-    SLEEP = sleep 5
-    MUEXE = mu
-    MKDIR = $(MUEXE) mkdirhier
-    TESTS = prestarttests poststarttests
-endif
-
-ifeq ($(OS),HPUX)
-    CIMSERVER_START_SERVICE = cimserver
-    CIMSERVER_STOP_SERVICE = cimserver -s; true
-    SLEEP = sleep 5
-    MUEXE = mu
-    MKDIR = $(MUEXE) mkdirhier
-    TESTS = prestarttests poststarttests
-endif
-
-ifdef PEGASUS_PLATFORM_LINUX_GENERIC_GNU
-    CIMSERVER_START_SERVICE = cimserver
-    CIMSERVER_STOP_SERVICE = cimserver -s; true
-    SLEEP = sleep 5
-    MUEXE = mu
-    MKDIR = $(MUEXE) mkdirhier
-    TESTS = prestarttests poststarttests
-endif
+TESTS = prestarttests poststarttests
 
 error:
        @ $(ECHO) "Specify desired makefile option (i.e., build, rebuild)"
 
 buildmu:
        $(MAKE) --directory=$(PEGASUS_ROOT)/src/utils/mu -f Makefile
-       $(MKDIR) $(BIN_DIR)
+       $(MKDIRHIER) $(BIN_DIR)
 
 rebuild: clean buildmu all
 
@@ -87,16 +45,16 @@ clean:
 
 repositoryServer:
        $(CIMSERVER_STOP_SERVICE)
-       $(SLEEP)
+       $(SLEEP) 5
        $(RMDIRHIER) $(REPOSITORY_ROOT)
        $(CIMSERVER_START_SERVICE)
-       $(SLEEP)
+       $(SLEEP) 5
        $(MAKE) -f Makefile repositoryServer
        $(MAKE) -f Makefile testrepositoryServer
 
 prestarttests:
        $(CIMSERVER_STOP_SERVICE)
-       $(SLEEP)
+       $(SLEEP) 5
        $(MAKE) -f Makefile repository
        $(MAKE) -f Makefile testrepository
        $(MAKE) -f Makefile tests
@@ -107,7 +65,7 @@ poststarttests:
        $(MAKE) --directory=$(PEGASUS_ROOT)/src/Pegasus/Query/QueryExpression/tests/Queries -f Makefile clean
        $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile clean
        $(CIMSERVER_START_SERVICE)
-       $(SLEEP)
+       $(SLEEP) 5
        $(MAKE) -f Makefile poststarttests
 
 tests: $(TESTS)
@@ -280,15 +238,15 @@ ConfigureAuthorizations:
 
 startcimWithoutSSL:
        $(CIMSERVER_START_SERVICE)
-       $(SLEEP)
+       $(SLEEP) 5
 
 startcimWithSSL:
        $(CIMSERVER_START_SERVICE) enableHttpConnection=false enableHttpsConnection=true
-       $(SLEEP)
+       $(SLEEP) 5
 
 stopcim:
        $(CIMSERVER_STOP_SERVICE)
-       $(SLEEP)
+       $(SLEEP) 5
 
 rebuild:
        $(MAKE) -f TestMakefile -i stopcim
index 90c914955d1e2a2bfc2c160ba80314d5a827bf5a..0d2d263478cc6146010d28be6a2b2e20f0789667 100644 (file)
 ###############################################################################
 
 include $(PEGASUS_ROOT)/mak/config.mak
+include $(PEGASUS_ROOT)/mak/commands.mak
 
-# There is a start command for cimserver but no stop today.  Because of problems with
-# the use of cimserver as a service, we simply used the start command to allow us to
-# get on with testing. I know of no CLI to stop a window started with start so that
-# field is blank.  ks 7 April 2002
-ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
-  CIMSERVER_START_SERVICE = cimserver -start
-  CIMSERVER_STOP_SERVICE = cimserver -stop
-  SLEEP =
-  REMOVE_PEGASUS_DIRECTORY = mu rmdirhier pegasus
-  MUEXE = mu.exe
-  MKDIR = $(MUEXE) mkdirhier
-  TESTS = prestarttests poststarttests
-endif
-
-ifeq ($(OS),HPUX)
-  CIMSERVER_START_SERVICE = cimserver
-  CIMSERVER_STOP_SERVICE = cimserver -s; true
-  SLEEP = sleep 5
-  REMOVE_PEGASUS_DIRECTORY = rm -Rf pegasus.old; mv pegasus pegasus.old
-  MUEXE = mu
-  MKDIR = $(MUEXE) mkdirhier
-  TESTS = prestarttests poststarttests
-endif
-
-ifeq ($(PEGASUS_PLATFORM),SOLARIS_SPARC_CC)
-  CIMSERVER_START_SERVICE = cimserver
-  CIMSERVER_STOP_SERVICE = /usr/bin/ps -ef | /usr/bin/grep cimserver | /usr/bin/grep -v grep | /usr/bin/awk '{print "kill -9 "$$2 |"/usr/bin/ksh"}'
-  SLEEP = sleep 5
-  REMOVE_PEGASUS_DIRECTORY = rm -Rf pegasus.old; mv pegasus pegasus.old
-  MUEXE = mu
-  MKDIR = $(MUEXE) mkdirhier
-  TESTS = prestarttests poststarttests
-endif
-
-ifdef PEGASUS_PLATFORM_LINUX_GENERIC_GNU
-  CIMSERVER_START_SERVICE = cimserver
-  CIMSERVER_STOP_SERVICE = /bin/ps -ef | /bin/grep cimserver | /bin/grep -v grep | /usr/bin/awk '{print "kill -9 "$$2 |"/bin/bash"}'
-  SLEEP = sleep 5
-  REMOVE_PEGASUS_DIRECTORY = rm -Rf pegasus.old; mv pegasus pegasus.old
-  MUEXE = mu
-  MKDIR = $(MUEXE) mkdirhier
-  TESTS = prestarttests poststarttests
-endif
+TESTS = prestarttests poststarttests
 
 ifeq ($(DYNAMIC_SOCKSIFY),TRUE)
   CVS = socksify cvs
@@ -78,7 +37,7 @@ error:
 
 buildmu:
        $(MAKE) --directory=$(PEGASUS_ROOT)/src/utils/mu -f Makefile
-       $(MKDIR) $(BIN_DIR)
+       $(MKDIRHIER) $(BIN_DIR)
 
 cleanbuild: removeall recheckout buildmu all $(TESTS) 
 
@@ -111,16 +70,16 @@ clean:
 
 repositoryServer: 
        $(CIMSERVER_STOP_SERVICE)
-       $(SLEEP)
+       $(SLEEP) 5
        $(RMDIRHIER) $(REPOSITORY_ROOT)
        $(CIMSERVER_START_SERVICE)
-       $(SLEEP)
+       $(SLEEP) 5
        $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer
        $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer
 
 prestarttests: 
        $(CIMSERVER_STOP_SERVICE)
-       $(SLEEP)
+       $(SLEEP) 5
        $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
        $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
        $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile tests
@@ -131,28 +90,10 @@ poststarttests:
        $(MAKE) --directory=$(PEGASUS_ROOT)/src/Pegasus/Query/QueryExpression/tests/Queries -f Makefile clean
        $(MAKE) --directory=$(PEGASUS_ROOT)/test/wetest -f Makefile clean
        $(CIMSERVER_START_SERVICE)
-       $(SLEEP)
+       $(SLEEP) 5
        $(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile poststarttests
 
 ###############################################################################
-##  Test Suite Definitions
-###############################################################################
-
-###############################################################################
-##  OOP Test Suite 1: "Out-of-Process"(OOP) Provider Tests
-##
-##  Configuration Options: forceProviderProcesses=true
-##
-###############################################################################
-OOP_TS1_CONFIG_OPTIONS = forceProviderProcesses=true
-OOP_TS1_TEST_CMDS = \
-        TestClient
-
-run_OOP_TS1:
-       $(MAKE) -f $(PEGASUS_ROOT)/mak/commands.mak runTestSuite \
-            CIMSERVER_CONFIG_OPTIONS="$(OOP_TS1_CONFIG_OPTIONS)" \
-            TESTSUITE_CMDS="$(OOP_TS1_TEST_CMDS)"
-###############################################################################
 
 tests: $(TESTS)
 ifeq ($(PEGASUS_PLATFORM),WIN32_IX86_MSVC)
index 5122fed8615b1d127f937d0a21c5f8ec7fcbde0e..113108cff05a7ffd276b42e8dab702db7a8a2cf3 100644 (file)
@@ -1,14 +1,8 @@
 ifeq ($(PEGASUS_PLATFORM), WIN32_IX86_MSVC)
-    CIMSERVER_START_SERVICE =
-    CIMSERVER_STOP_SERVICE =
-    SLEEP = mu sleep 5
     STRIPCRS = stripcrs $(RESULTFILE) $(MASTERRESULTFILE)
     DIFF = mu compare
     REDIRECTERROR = 2>&1
 else
-    CIMSERVER_START_SERVICE = cimserver
-    CIMSERVER_STOP_SERVICE = /usr/bin/ps -ef | /usr/bin/grep cimserver | /usr/bin/grep -v grep | /usr/bin/awk '{print "kill -9 "$$2 |"/usr/bin/sh"}'
-    SLEEP = sleep 5
     STRIPCRS =
     DIFF = diff
     REDIRECTERROR = 2>&1
@@ -30,11 +24,3 @@ default:
 
 #l10n
 messages: $(ERROR)
-
-cimstop:
-       $(CIMSERVER_STOP_SERVICE)
-       $(SLEEP)
-
-cimstart:
-       $(CIMSERVER_START_SERVICE)
-       $(SLEEP)
index afdba4166b401d0df284ca4610735cb28cd33407..b3a33016a53116db4d28c0aafa90dfbbd0748f39 100644 (file)
@@ -1,6 +1,7 @@
 include $(PEGASUS_ROOT)/mak/config.mak
 include $(PEGASUS_ROOT)/mak/configschema.mak
 include $(PEGASUS_ROOT)/mak/test.mak
+include $(PEGASUS_ROOT)/mak/commands.mak
 
 ifdef TESTID
    BenchmarkMOF_NAME = benchmarkProvider_$(TESTID)