(file) Return to Makefile CVS log (file) (dir) Up to [Pegasus] / pegasus_unsupported / wsm

  1 karl  1.1 ##%{############################################################################
  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           ## Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12           ## EMC Corporation; Symantec Corporation; The Open Group.
 13           ##
 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:
 20           ##
 21           ## THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 karl  1.1 ## 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.
 29           ##
 30           ##%}############################################################################
 31           
 32           # Force use of WSMAN for live tests
 33           export WSM_USE_WSMAN=1
 34           
 35           # Option to use local directory in place of a CIMServer.
 36           # If PEGASUS_CLIENT_HOME set to a directory we attempt to use that directory
 37           # plus /repository as the local directory for Class operation.
 38           # To use the server instead, comment out the following line.
 39           export PEGASUS_CLIENT_HOME=$(PEGASUS_HOME)
 40           
 41 karl  1.4 # Note that wsm uses the Pegasus core mak facilities driven from the following
 42           # include.  
 43 karl  1.1 include $(PEGASUS_ROOT)/mak/config.mak
 44           
 45           ifndef PEGASUS_ROOT
 46           $(error Please define PEGASUS_ROOT)
 47           endif
 48           
 49           ifndef PEGASUS_HOME
 50           $(error Please define PEGASUS_HOME)
 51           endif
 52           
 53           ifndef PEGASUS_PLATFORM
 54           $(error Please define PEGASUS_PLATFORM)
 55           endif
 56           
 57           DIRS = src
 58           
 59           # set up the port for wsm.  Note that we
 60           # set it here because there are multiple "default" ports for wsman.
 61           # Within Inova testing we use 22222 and set that in the common/defines.h
 62           # However, the tests with Microsoft use 80 and that is set in the defines.h
 63           # when we export or compile in the test center to make life easier.
 64 karl  1.1 # This also should be set to whatever the local "default" 
 65           WSMPORT = 22222
 66           
 67           # The default WSMADDR simply sets the port.  A user can set both the port
 68           # and host address with the comand options WSMADDR="-s host -p port"
 69           WSMADDR = -p $(WSMPORT)
 70           
 71           # This controls port and host for the wsm address for the Pegasus $(CLI) commands
 72           # in this test.  It is NOT set for local tests.  If a remote test is
 73           # desired set it to PEGWSMADDR="-l host:port" on the make command line.
 74           #PEGWSMADDR
 75           
 76 karl  1.4 #WSM_USE_SSL
 77           
 78 karl  1.1 
 79           include $(PEGASUS_ROOT)/mak/recurse.mak
 80           
 81           ##==============================================================================
 82           ##
 83           ## rebuild:
 84           ##
 85           ##==============================================================================
 86           
 87           rebuild:
 88           	$(MAKE) clean
 89           	$(MAKE)
 90           
 91           ##==============================================================================
 92           ##
 93           ## live-tests:
 94           ##
 95           ##==============================================================================
 96           
 97           NAMESPACE=root/cimv2
 98           CROSSNAMESPACE=root/PG_InterOp
 99 karl  1.1 
100 karl  1.3 AUTH=
101           
102           live-tests: register wsm cli
103 karl  1.1 	@ echo ""
104           	@ echo "+++++ PASSED ALL TESTS"
105           	@ echo ""
106           
107 karl  1.4 wsm: identify create create2 get2 delete2 get enum put delete assoc
108           
109           # Note that this is a temporary test.
110           identify:
111           	wsmidentify
112 karl  1.1 create:
113           	wsmcreate -n $(NAMESPACE) $(WSMADDR) \
114 karl  1.3             President num=100 first=Betty last=Boop $(AUTH)
115 karl  1.1 
116           get:
117 karl  1.3 	wsmget -n $(NAMESPACE) $(WSMADDR) President num=100 $(AUTH)
118 karl  1.1 	wsmget -n $(NAMESPACE) $(WSMADDR) \
119                       PresidentLink \
120                       pred:President pred.num=1 \
121                       succ:President succ.num=2 \
122 karl  1.3 	    $(AUTH)
123 karl  1.1 
124           put:
125           	wsmput -n $(NAMESPACE) $(WSMADDR) President num=100 \
126 karl  1.3             _ num=100 first=Jane last=Doe $(AUTH)
127           	wsmput -n $(NAMESPACE) $(WSMADDR) President num=100 _ last=Doe $(AUTH)
128           	wsmput -n $(NAMESPACE) $(WSMADDR) President num=100 _ first=Jane $(AUTH)
129           	wsmput -n $(NAMESPACE) $(WSMADDR) President num=100 _ num=100 $(AUTH)
130 karl  1.1 
131           delete:
132 karl  1.3 	wsmdelete -n $(NAMESPACE) $(WSMADDR) President num=100 $(AUTH)
133 karl  1.1 
134           enum:
135 karl  1.3 	wsmenum -n $(NAMESPACE) $(WSMADDR) President $(AUTH)
136 karl  1.1 
137           assoc:
138 karl  1.3 	wsmassoc -n $(NAMESPACE) $(WSMADDR) President num=1 $(AUTH)
139           	wsmassoc -n $(NAMESPACE) $(WSMADDR) -R President num=1 $(AUTH)
140 karl  1.1 
141           register:
142           	$(MAKE) -C mof install NAMESPACE=$(NAMESPACE)
143           
144           create2:
145           	wsmcreate -n $(NAMESPACE) $(WSMADDR) WSMClass \
146                       key1=1 \
147                       key2=Hello \
148                       a1=one a1=two a1=two \
149                       a2=1 a2=2 a2=3 a2=4 \
150 karl  1.3             a3=true a3=false $(AUTH)
151 karl  1.1 
152           get2:
153 karl  1.3 	wsmget -n $(NAMESPACE) $(WSMADDR) WSMClass key1=1 key2=Hello $(AUTH)
154 karl  1.1 
155           delete2:
156 karl  1.3 	wsmdelete -n $(NAMESPACE) $(WSMADDR) WSMClass key1=1 key2=Hello $(AUTH)
157 karl  1.1 
158           # if using Pegasus 2.5 it was CLI.  Pegasus 2.6 release and 2.7 dev changed this to
159           # cimcli
160           CLICMD=cimcli
161           
162 karl  1.2 cli: cli1 cli2 cli3
163           
164 karl  1.4 # enumerate and enumeratename tests
165 karl  1.2 cli1:
166           
167 karl  1.1 	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) ei President -count 6
168           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) ni President -count 6
169           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) ei PresidentLink -count 6
170           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) ni PresidentLink -count 6
171           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) ei CIM_ManagedElement
172           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) ni CIM_ManagedElement
173 karl  1.2 
174 karl  1.4 # association name requests
175 karl  1.2 cli2:
176 karl  1.1 	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -count 3
177           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -rc President -count 2
178           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -ac successionlink -count 1
179           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -ac Presidentlink -count 2
180           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -ac Presidentlink -rc President -count 2
181           	$(CLICMD) -n $(CROSSNAMESPACE) $(PEGWSMADDR) an VicePresident.num=2000 -count 1
182           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -ac successionlink -count 1
183           
184 karl  1.4 # association requests
185 karl  1.2 cli3:
186 karl  1.1 	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) a President.num=1 -count 3
187           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) a President.num=1 -rc President -count 2
188           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) a President.num=1 -ac successionlink -count 1
189           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) a President.num=1 -ac Presidentlink -count 2
190           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) a President.num=1 -ac Presidentlink -rc President -count 2
191           	$(CLICMD) -n $(CROSSNAMESPACE) $(PEGWSMADDR) a VicePresident.num=2000 -count 1
192           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) a President.num=1 -ac successionlink -count 1
193           
194           ## The following tests represent errors in Pegasus
195           clierrorPegasus:
196                   # These are caused becasue VicePresident is NOT in the $(NAMESPACE) namespace
197           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -ac Presidentlink -rc VicePresident -count 2
198           	$(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -rc VicePresident -count 1
199           ##
200           ## Before running this, build and register the WSMMethodProvider under
201           ## src/providers/WSMMethodProvider.
202           ##
203           
204           invoke:
205           	wsminvoke WSMMethod meth p1=99 p2=true p3=Hello
206           
207 karl  1.1 ##
208           ## Repeat the test suite with the namespace name in upper case
209           ##
210           namespaceCase:
211           	make -f Makefile live-tests NAMESPACE=ROOT/CIMV2
212           
213 karl  1.3 ##
214           ## Run the wsm tests with basic authentication.
215           ##
216           ## Note that this is a unix only thing now because we start the wsmserver
217           ## There is an issue now with the initial server startup hanging sometimes.
218           ##
219           testbasicauthwsm:
220           	wsmserver -A basic &
221           	make -f Makefile wsm AUTH="-A basic -u fred -w none"
222 karl  1.4 	make -f Makefile killwsm
223 karl  1.3 
224 karl  1.4 ##
225           ## Run the wsm tests with digest authentication.
226           ##
227 karl  1.3 testdigestauthwsm:
228           	wsmserver -A digest &
229           	make -f Makefile wsm AUTH="-A digest -u fred -w none"
230 karl  1.4 	make -f Makefile killwsm
231 karl  1.3 ##
232           ## kill the wsmserver - This is a unix only thing right now
233           ## because it uses the unix kill command
234           ##
235 karl  1.4 killwsm:
236 karl  1.3 	kill -9 wsmserver
237 karl  1.1 
238           ##
239           ## Stop server, regenerate repository, restart the server:
240           ##
241           regen:
242           	-cimserver -s
243           	make -C $(PEGASUS_ROOT) repository
244           	-cimserver
245           
246           ##==============================================================================
247           ##
248           ## CVS tag and definition of current version:
249           ##
250           ##==============================================================================
251           
252           MAJOR=0
253           MINOR=4
254           REVSION=02
255           VERSION=$(MAJOR).$(MINOR).$(REVSION)
256           TAG=wsm_$(MAJOR)_$(MINOR)_$(REVSION)
257           
258 karl  1.1 tag:
259           	@ cvs tag -F $(TAG) > /dev/null
260           	@ echo "Added $(TAG) tag"
261           ##==============================================================================
262           ##
263           ## dist: Create a distributable set of source files compacted.
264           ##
265           ##==============================================================================
266           
267           DISTROOT=wsm-$(VERSION)
268           TARDIST=$(DISTROOT).tar.gz
269           ZIPDIST=$(DISTROOT).zip
270           
271           dist:
272           	rm -f /tmp/$(TARDIST)
273           	rm -f /tmp/$(ZIPDIST)
274           	rm -rf /tmp/$(DISTROOT)
275           	cp -r . /tmp/$(DISTROOT)
276           	rm -rf `find /tmp/$(DISTROOT) -name CVS`
277           	echo "Creating /tmp/$(TARDIST)..."
278           	( cd /tmp ; tar zcf $(TARDIST) $(DISTROOT) )
279 karl  1.1 	echo "Creating /tmp/$(ZIPDIST)..."
280           	( cd /tmp/$(DISTROOT) ; zip -q -R ../$(ZIPDIST) '*' )
281           	rm -rf /tmp/$(DISTROOT)
282           

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2