version 1.9, 2008/11/18 19:32:21
|
version 1.10, 2008/11/19 22:05:19
|
|
|
GREP:=grep | GREP:=grep |
ECHO:=echo | ECHO:=echo |
TOG_INSTALLED_RPMS:=$(shell $(RPM) -qa|grep tog-pegasus) | TOG_INSTALLED_RPMS:=$(shell $(RPM) -qa|grep tog-pegasus) |
CIMSERVER_START_SERVICE:=$(PEGASUS_SBIN_DIR)/cimserver |
|
CIMSERVER_STOP_SERVICE:=$(PEGASUS_SBIN_DIR)/cimserver -s |
|
| |
ifdef PEGASUS_BUILD_BRANCH | ifdef PEGASUS_BUILD_BRANCH |
ifeq ($(PEGASUS_BUILD_BRANCH),MAIN) | ifeq ($(PEGASUS_BUILD_BRANCH),MAIN) |
|
|
exit 1; fi | exit 1; fi |
endef | endef |
| |
|
define startCIMServer |
|
@/etc/init.d/tog-pegasus status > /dev/null 2>&1; \ |
|
if [ $$? != 0 ]; then \ |
|
/etc/init.d/tog-pegasus start; \ |
|
fi |
|
endef |
|
|
|
define stopCIMServer |
|
@/etc/init.d/tog-pegasus status > /dev/null 2>&1; \ |
|
if [ $$? == 0 ]; then \ |
|
/etc/init.d/tog-pegasus stop; \ |
|
fi |
|
endef |
|
|
|
|
exportSRC: | exportSRC: |
@cvs -d:pserver:anon@cvs.opengroup.org:/cvs/MSB export -r $(PEGASUS_RPM_CVS_TAG) pegasus | @cvs -d:pserver:anon@cvs.opengroup.org:/cvs/MSB export -r $(PEGASUS_RPM_CVS_TAG) pegasus |
| |
|
|
| |
tests: | tests: |
# Start cimserver | # Start cimserver |
-$(CIMSERVER_STOP_SERVICE) |
-$(call stopCIMServer) |
$(CIMSERVER_START_SERVICE) |
$(call startCIMServer) |
$(call checkForCores,./,-maxdepth 1) | $(call checkForCores,./,-maxdepth 1) |
| |
# Run some sanity tests | # Run some sanity tests |
|
|
$(call checkForCores,./,-maxdepth 1) | $(call checkForCores,./,-maxdepth 1) |
| |
@$(ECHO) "+++++ Stopping cimserver +++++" | @$(ECHO) "+++++ Stopping cimserver +++++" |
@$(CIMSERVER_STOP_SERVICE) |
@$(call stopCIMServer) |
$(call checkForCores,./,-maxdepth 1) | $(call checkForCores,./,-maxdepth 1) |
| |
@$(ECHO) "+++++ Starting cimserver +++++" | @$(ECHO) "+++++ Starting cimserver +++++" |
$(CIMSERVER_START_SERVICE) |
$(call startCIMServer) |
$(call checkForCores,./,-maxdepth 1) | $(call checkForCores,./,-maxdepth 1) |
| |
# Run samples | # Run samples |
|
|
| |
cleanRPM: | cleanRPM: |
-$(RPM) -e $(filter tog-pegasus-test%,$(TOG_INSTALLED_RPMS)) | -$(RPM) -e $(filter tog-pegasus-test%,$(TOG_INSTALLED_RPMS)) |
|
-$(call startCIMServer) |
-$(RPM) -e $(filter tog-pegasus-devel%,$(TOG_INSTALLED_RPMS)) | -$(RPM) -e $(filter tog-pegasus-devel%,$(TOG_INSTALLED_RPMS)) |
-$(RPM) -e $(filter tog-pegasus-2%,$(TOG_INSTALLED_RPMS)) | -$(RPM) -e $(filter tog-pegasus-2%,$(TOG_INSTALLED_RPMS)) |
-$(RM) -Rf $(RPM_SRC_DIR).old | -$(RM) -Rf $(RPM_SRC_DIR).old |