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
42 include $(PEGASUS_ROOT)/mak/config.mak
43 karl 1.1
44 ifndef PEGASUS_ROOT
45 $(error Please define PEGASUS_ROOT)
46 endif
47
48 ifndef PEGASUS_HOME
49 $(error Please define PEGASUS_HOME)
50 endif
51
52 ifndef PEGASUS_PLATFORM
53 $(error Please define PEGASUS_PLATFORM)
54 endif
55
56 DIRS = src
57
58 # set up the port for wsm. Note that we
59 # set it here because there are multiple "default" ports for wsman.
60 # Within Inova testing we use 22222 and set that in the common/defines.h
61 # However, the tests with Microsoft use 80 and that is set in the defines.h
62 # when we export or compile in the test center to make life easier.
63 # This also should be set to whatever the local "default"
64 karl 1.1 WSMPORT = 22222
65
66 # The default WSMADDR simply sets the port. A user can set both the port
67 # and host address with the comand options WSMADDR="-s host -p port"
68 WSMADDR = -p $(WSMPORT)
69
70 # This controls port and host for the wsm address for the Pegasus $(CLI) commands
71 # in this test. It is NOT set for local tests. If a remote test is
72 # desired set it to PEGWSMADDR="-l host:port" on the make command line.
73 #PEGWSMADDR
74
75
76 include $(PEGASUS_ROOT)/mak/recurse.mak
77
78 ##==============================================================================
79 ##
80 ## rebuild:
81 ##
82 ##==============================================================================
83
84 rebuild:
85 karl 1.1 $(MAKE) clean
86 $(MAKE)
87
88 ##==============================================================================
89 ##
90 ## live-tests:
91 ##
92 ##==============================================================================
93
94 NAMESPACE=root/cimv2
95 CROSSNAMESPACE=root/PG_InterOp
96
97 live-tests: register create create2 get2 delete2 get enum put delete assoc cli
98 @ echo ""
99 @ echo "+++++ PASSED ALL TESTS"
100 @ echo ""
101
102 create:
103 wsmcreate -n $(NAMESPACE) $(WSMADDR) \
104 President num=100 first=Betty last=Boop
105
106 karl 1.1 get:
107 wsmget -n $(NAMESPACE) $(WSMADDR) President num=100
108 wsmget -n $(NAMESPACE) $(WSMADDR) \
109 PresidentLink \
110 pred:President pred.num=1 \
111 succ:President succ.num=2 \
112
113 put:
114 wsmput -n $(NAMESPACE) $(WSMADDR) President num=100 \
115 _ num=100 first=Jane last=Doe
116 wsmput -n $(NAMESPACE) $(WSMADDR) President num=100 _ last=Doe
117 wsmput -n $(NAMESPACE) $(WSMADDR) President num=100 _ first=Jane
118 wsmput -n $(NAMESPACE) $(WSMADDR) President num=100 _ num=100
119
120 delete:
121 wsmdelete -n $(NAMESPACE) $(WSMADDR) President num=100
122
123 enum:
124 wsmenum -n $(NAMESPACE) $(WSMADDR) President
125
126 assoc:
127 karl 1.1 wsmassoc -n $(NAMESPACE) $(WSMADDR) President num=1
128 wsmassoc -n $(NAMESPACE) $(WSMADDR) -A President num=1
129
130 register:
131 $(MAKE) -C mof install NAMESPACE=$(NAMESPACE)
132
133 create2:
134 wsmcreate -n $(NAMESPACE) $(WSMADDR) WSMClass \
135 key1=1 \
136 key2=Hello \
137 a1=one a1=two a1=two \
138 a2=1 a2=2 a2=3 a2=4 \
139 a3=true a3=false
140
141 get2:
142 wsmget -n $(NAMESPACE) $(WSMADDR) WSMClass key1=1 key2=Hello
143
144 delete2:
145 wsmdelete -n $(NAMESPACE) $(WSMADDR) WSMClass key1=1 key2=Hello
146
147 # if using Pegasus 2.5 it was CLI. Pegasus 2.6 release and 2.7 dev changed this to
148 karl 1.1 # cimcli
149 CLICMD=cimcli
150
151 cli:
152 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) ei President -count 6
153 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) ni President -count 6
154 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) ei PresidentLink -count 6
155 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) ni PresidentLink -count 6
156 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) ei CIM_ManagedElement
157 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) ni CIM_ManagedElement
158 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -count 3
159 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -rc President -count 2
160 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -ac successionlink -count 1
161 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -ac Presidentlink -count 2
162 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -ac Presidentlink -rc President -count 2
163 $(CLICMD) -n $(CROSSNAMESPACE) $(PEGWSMADDR) an VicePresident.num=2000 -count 1
164 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -ac successionlink -count 1
165
166 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) a President.num=1 -count 3
167 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) a President.num=1 -rc President -count 2
168 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) a President.num=1 -ac successionlink -count 1
169 karl 1.1 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) a President.num=1 -ac Presidentlink -count 2
170 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) a President.num=1 -ac Presidentlink -rc President -count 2
171 $(CLICMD) -n $(CROSSNAMESPACE) $(PEGWSMADDR) a VicePresident.num=2000 -count 1
172 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) a President.num=1 -ac successionlink -count 1
173
174 ## The following tests represent errors in Pegasus
175 clierrorPegasus:
176 # These are caused becasue VicePresident is NOT in the $(NAMESPACE) namespace
177 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -ac Presidentlink -rc VicePresident -count 2
178 $(CLICMD) -n $(NAMESPACE) $(PEGWSMADDR) an President.num=1 -rc VicePresident -count 1
179 ##
180 ## Before running this, build and register the WSMMethodProvider under
181 ## src/providers/WSMMethodProvider.
182 ##
183
184 invoke:
185 wsminvoke WSMMethod meth p1=99 p2=true p3=Hello
186
187 ##
188 ## Repeat the test suite with the namespace name in upper case
189 ##
190 karl 1.1 namespaceCase:
191 make -f Makefile live-tests NAMESPACE=ROOT/CIMV2
192
193
194 ##
195 ## Stop server, regenerate repository, restart the server:
196 ##
197 regen:
198 -cimserver -s
199 make -C $(PEGASUS_ROOT) repository
200 -cimserver
201
202 ##==============================================================================
203 ##
204 ## CVS tag and definition of current version:
205 ##
206 ##==============================================================================
207
208 MAJOR=0
209 MINOR=4
210 REVSION=02
211 karl 1.1 VERSION=$(MAJOR).$(MINOR).$(REVSION)
212 TAG=wsm_$(MAJOR)_$(MINOR)_$(REVSION)
213
214 tag:
215 @ cvs tag -F $(TAG) > /dev/null
216 @ echo "Added $(TAG) tag"
217 ##==============================================================================
218 ##
219 ## dist: Create a distributable set of source files compacted.
220 ##
221 ##==============================================================================
222
223 DISTROOT=wsm-$(VERSION)
224 TARDIST=$(DISTROOT).tar.gz
225 ZIPDIST=$(DISTROOT).zip
226
227 dist:
228 rm -f /tmp/$(TARDIST)
229 rm -f /tmp/$(ZIPDIST)
230 rm -rf /tmp/$(DISTROOT)
231 cp -r . /tmp/$(DISTROOT)
232 karl 1.1 rm -rf `find /tmp/$(DISTROOT) -name CVS`
233 ## Remove the HP private directories
234 ##rm -rf $(DISTROOT)/wsm/src/wsm/cimservice
235 echo "Creating /tmp/$(TARDIST)..."
236 ( cd /tmp ; tar zcf $(TARDIST) $(DISTROOT) )
237 echo "Creating /tmp/$(ZIPDIST)..."
238 ( cd /tmp/$(DISTROOT) ; zip -q -R ../$(ZIPDIST) '*' )
239 rm -rf /tmp/$(DISTROOT)
240
|