summaryrefslogtreecommitdiffstats
path: root/tags/native-sca-1.0.incubating-M3-RC4/samples/runtest.sh
blob: 1c016a5287cab561cb5ba9818bb1f943b5a4c9fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/bin/sh

#  Licensed to the Apache Software Foundation (ASF) under one
#  or more contributor license agreements.  See the NOTICE file
#  distributed with this work for additional information
#  regarding copyright ownership.  The ASF licenses this file
#  to you under the Apache License, Version 2.0 (the
#  "License"); you may not use this file except in compliance
#  with the License.  You may obtain a copy of the License at
#  
#    http://www.apache.org/licenses/LICENSE-2.0
#    
#  Unless required by applicable law or agreed to in writing,
#  software distributed under the License is distributed on an
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#  KIND, either express or implied.  See the License for the
#  specific language governing permissions and limitations
#  under the License.


echo "Running CppCalculator client"
cd $TUSCANY_SCACPP/samples/CppCalculator/deploy/sample.calculator.client
r=`./runclient.sh | grep "div(5,2) = 2.5"`
if [ "x$r" == "x" ]
then
  echo "CppCalculator client failed"
fi

echo "Running CppCalculator wsclient"
cd $TUSCANY_SCACPP/samples/CppCalculator/deploy/sample.calculator
(./runwsserver.sh >/dev/null)&
cd $TUSCANY_SCACPP/samples/CppCalculator/deploy/sample.calculator.wsclient
r=`./runwsclient.sh | grep "Result = 2.500e+00"`
killall -q axis2_http_server >/dev/null
if [ "x$r" == "x" ]
then
  echo "CppCalculator wsclient failed"
fi

echo "Running CppBigBank client"
cd $TUSCANY_SCACPP/samples/CppBigBank/deploy/bigbank.client
r=`./runclient.sh | grep "Balance"`
if [ "x$r" == "x" ]
then
  echo "CppBigBank client failed"
fi

echo "Running CppBigBank wsclient"
cd $TUSCANY_SCACPP/samples/CppBigBank/deploy/bigbank.account
(./runwsserver.sh >/dev/null)&
cd $TUSCANY_SCACPP/samples/CppBigBank/deploy/bigbank.wsclient
r=`./runwsclient.sh | grep "</balance>"`
killall -q axis2_http_server >/dev/null
if [ "x$r" == "x" ]
then
  echo "CppBigBank wsclient failed"
fi

echo "Running RubyCalculator client"
cd $TUSCANY_SCACPP/samples/RubyCalculator/deploy/sample.calculator.client
r=`./runclient.sh | grep "^3"`
if [ "x$r" == "x" ]
then
  echo "RubyCalculator client failed"
fi

echo "Running RubyCalculator wsclient"
cd $TUSCANY_SCACPP/samples/RubyCalculator/deploy/sample.calculator
(./runwsserver.sh >/dev/null)&
cd $TUSCANY_SCACPP/samples/RubyCalculator/deploy/sample.calculator.wsclient
r=`./runwsclient.sh | grep "^3.0"`
killall -q axis2_http_server >/dev/null
if [ "x$r" == "x" ]
then
  echo "RubyCalculator wsclient failed"
fi

echo "Running RubyBigBank client"
cd $TUSCANY_SCACPP/samples/RubyBigBank/deploy/bigbank.client
r=`./runclient.sh | grep "Balance:"`
if [ "x$r" == "x" ]
then
  echo "RubyBigBank client failed"
fi

echo "Running RubyBigBank wsclient"
cd $TUSCANY_SCACPP/samples/RubyBigBank/deploy/bigbank.account
(./runwsserver.sh >/dev/null)&
cd $TUSCANY_SCACPP/samples/RubyBigBank/deploy/bigbank.wsclient
r=`./runwsclient.sh | grep "Balance:"`
killall -q axis2_http_server >/dev/null
if [ "x$r" == "x" ]
then
  echo "RubyBigBank wsclient failed"
fi

echo "Running PythonCalculator client"
cd $TUSCANY_SCACPP/samples/PythonCalculator/deploy/sample.calculator.client
r=`./runclient.sh | grep "div ( 5 , 2 ) =  3.0"`
if [ "x$r" == "x" ]
then
  echo "PythonCalculator client failed"
fi

echo "Running PythonCalculator wsclient"
cd $TUSCANY_SCACPP/samples/PythonCalculator/deploy/sample.calculator
(./runwsserver.sh >/dev/null)&
cd $TUSCANY_SCACPP/samples/PythonCalculator/deploy/sample.calculator.wsclient
r=`./runwsclient.sh | grep "div ( 5 , 2 ) =  3.0"`
killall -q axis2_http_server >/dev/null
if [ "x$r" == "x" ]
then
  echo "PythonCalculator wsclient failed"
fi

echo "Running PythonWeatherForecast client"
cd $TUSCANY_SCACPP/samples/PythonWeatherForecast/deploy/sample.weather.client
r=`./runclient.sh | grep "Latitude: 34.090107"`
if [ "x$r" == "x" ]
then
  echo "PythonWeatherForecast client failed"
fi

echo "Running HttpdBigBank wsclient"
cd $TUSCANY_SCACPP/samples/HttpdBigBank/deploy/httpserver
./startserver.sh >/dev/null
cd $TUSCANY_SCACPP/samples/HttpdBigBank/deploy/bigbank.wsclient
r=`./runwsclient.sh | grep "Balance:"`
cd $TUSCANY_SCACPP/samples/HttpdBigBank/deploy/httpserver
./stopserver.sh >/dev/null
if [ "x$r" == "x" ]
then
  echo "HttpdBigBank wsclient failed"
fi

echo "Running RestCalculator restclient"
cd $TUSCANY_SCACPP/samples/RestCalculator/deploy/httpserver
./startserver.sh >/dev/null
cd $TUSCANY_SCACPP/samples/RestCalculator/deploy/sample.calculator.restclient
r=`./runrestclient.sh | grep "^3"`
cd $TUSCANY_SCACPP/samples/RestCalculator/deploy/httpserver
./stopserver.sh >/dev/null
if [ "x$r" == "x" ]
then
  echo "RestCalculator restclient failed"
fi

echo "Running RestCustomer restclient"
cd $TUSCANY_SCACPP/samples/RestCustomer/deploy/httpserver
./startserver.sh >/dev/null
cd $TUSCANY_SCACPP/samples/RestCustomer/deploy/sample.customer.restclient
r=`./runrestclient.sh | grep "Command  - Deleted customer 1234"`
cd $TUSCANY_SCACPP/samples/RestCustomer/deploy/httpserver
./stopserver.sh >/dev/null
if [ "x$r" == "x" ]
then
  echo "RestCustomer restclient failed"
fi