(file) Return to BuildMakefile CVS log (file) (dir) Up to [Pegasus] / pegasus / mak

File: [Pegasus] / pegasus / mak / BuildMakefile (download)
Revision: 1.33, Thu Feb 10 06:41:52 2005 UTC (19 years, 3 months ago) by denise.eckstein
Branch: MAIN
Changes since 1.32: +20 -0 lines
BUG#: 2706
TITLE: Add OOP test suite

DESCRIPTION: Add OOP test suite definition to pegasus/mak/BuildMakefile and pegasus/TestMakefile. Test can be run by typing make -f TestMakefile run_OOP_TS1 or make -f mak/BuildMakefile run_OOP_TS1.

###############################################################################
##
## Makefile for Pegasus CIMOM
##
## NOTE: Makefile needs to be executed from the parent directory of 
## pegasus directory because the path settings are relative and this
## Makefile may remove and recheckout the pegasus source tree.
##
## Options:
##      cleanbuild - Removes the existing pegasus directory contents, performs
##                   checkout, build and runs tests. 
##      rebuild    - Rebuild and execute tests.
## 
###############################################################################

###############################################################################
##
## Platform specific settings for several platforms.
##
## NOTE: Please add platform specific environment variables as appropriate. 
##
###############################################################################

include $(PEGASUS_ROOT)/mak/config.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

ifeq ($(DYNAMIC_SOCKSIFY),TRUE)
  CVS = socksify cvs
else
  CVS = cvs
endif

error: 
	@ echo "Specify desired makefile option (i.e., cleanbuild, rebuild)"

buildmu:
	$(MAKE) --directory=$(PEGASUS_ROOT)/src/utils/mu -f Makefile
	$(MKDIR) $(BIN_DIR)

cleanbuild: removeall recheckout buildmu all $(TESTS) 

recheckout: removeall checkout

removeall:
	$(REMOVE_PEGASUS_DIRECTORY)

checkout:
	$(CVS) checkout pegasus

rebuild: clean buildmu all tests

rebuild-notest: clean buildmu all

build: all tests

build-notest: all

all: buildmu
	$(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile depend
	$(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile all

doc:
	$(MAKE) --directory=$(PEGASUS_ROOT)/doc/ProviderSpec -f Makefile
	$(MAKE) --directory=$(PEGASUS_ROOT)/doc/DevManual -f Makefile

clean:
	$(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile clean

repositoryServer: 
	$(CIMSERVER_STOP_SERVICE)
	$(SLEEP)
	$(RMDIRHIER) $(REPOSITORY_ROOT)
	$(CIMSERVER_START_SERVICE)
	$(SLEEP)
	$(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repositoryServer
	$(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepositoryServer

prestarttests: 
	$(CIMSERVER_STOP_SERVICE)
	$(SLEEP)
	$(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile repository
	$(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile testrepository
	$(MAKE) --directory=$(PEGASUS_ROOT) -f Makefile tests
	$(MAKE) --directory=$(PEGASUS_ROOT)/src/Server -f Makefile install_run

poststarttests:
	$(MAKE) --directory=$(PEGASUS_ROOT)/src/Pegasus/CQL/tests/Queries -f Makefile clean
	$(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)
	$(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)
	$(CIMSERVER_STOP_SERVICE)
	$(MAKE) --directory=$(PEGASUS_ROOT)src/Server -f Makefile uninstall
endif
	@ echo Finished Tests

###############################################################################
##
## Trace Configuration
##
## Options:
##      XMLTraceOn: Enables XML request and response tracing.
##      ProviderLoadTraceOn: Enables Provider load tracing.
##      XML+ProviderLoadTraceOn: Enables both XML request/response and Provider
##                                 load tracing.
##      AllTraceOn: Enables all tracing.
##      AllTraceOff: Disables all tracing.
##      list: Lists trace settings.
##
###############################################################################

XMLTraceOn:
	cimconfig -s traceComponents=XmlIO -c
	cimconfig -s traceLevel=3 -c
	cimconfig -g traceComponents
	cimconfig -g traceLevel

ProviderLoadTraceOn:
	cimconfig -s traceComponents=ProvManager,OsAbstraction
	cimconfig -s traceLevel=3 -c
	cimconfig -g traceComponents
	cimconfig -g traceLevel

XML+ProviderLoadTraceOn:
	cimconfig -s traceComponents=XmlIO,ProvManager,OsAbstraction
	cimconfig -s traceLevel=3 -c
	cimconfig -g traceComponents
	cimconfig -g traceLevel

AllTraceOn:
	cimconfig -s traceComponents=ALL
	cimconfig -s traceLevel=3 -c
	cimconfig -g traceComponents
	cimconfig -g traceLevel

AllTraceOff:
	cimconfig -s traceComponents=
	cimconfig -g traceComponents
	cimconfig -g traceLevel

list:
	cimconfig -g traceComponents
	cimconfig -g traceLevel
	cimconfig -g traceFilePath

# DO NOT DELETE

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2