You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by da...@apache.org on 2004/09/03 14:29:16 UTC
cvs commit: ws-axis/c/tests/auto_build/testcases/platform/linux runTestCase.sh
damitha 2004/09/03 05:29:16
Modified: c/tests/auto_build Readme.txt autoBuildCVS.sh runAllTests.sh
c/tests/auto_build/testcases/platform/linux runTestCase.sh
Log:
Now in test.config file you can give host and port for your each test seperately
Revision Changes Path
1.2 +11 -21 ws-axis/c/tests/auto_build/Readme.txt
Index: Readme.txt
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/Readme.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Readme.txt 2 Sep 2004 06:35:55 -0000 1.1
+++ Readme.txt 3 Sep 2004 12:29:16 -0000 1.2
@@ -78,15 +78,6 @@
Linux
-----
-Snippet from a script
------------------------
- runTest.sh testcases/wsdls/MathOps.wsdl c++
------------------------
-
- Should result in:
- "Regression test on wsdls/MathOps.wsdl for c++ success"
-
-
When you want to add a new test please be aware of the following simple steps.
1. Write the cpp file containing your main method of access and put
@@ -98,26 +89,25 @@
2. Put the wsdl you hope to test in
testcases/wsdls
-3. Give the server and port running the webservice in
- testcases/platform/linux/test.config file
-
-4. Add the following entry into the testcases/runAllTests.sh
-
- runTestCase.sh wsdls/<your-wsdl-name.wsdl c++
- [[ $? -eq 0 ]] && passed=$(($passed + 1))
-
-5. cd to testcases and run runAllTests.sh
+3. Add the server and port running the webservice in
+ testcases/platform/linux/test.config file. The format is
+ <wsdl file name (without .wsdl part)>:host=<your host>
+ <wsdl file name (without .wsdl part)>:port=<your port>
+
+4. cd to auto_build and run autoBuildCVS.sh
+ This will first checkout from cvs and then build the source.
+ Then generate samples from each wsdl.
You will have a new folder creaed in testcases/build folder with the
same name as the client cpp file name.
First time you should get run FAIL message. That's because you still
does not have a .out file indicating your expected result. We will
create this in the next step
-7. in testcases/build/<automaticall creaed your client folder> you will
+5. in testcases/build/<automaticall creaed your client folder> you will
see a file named <Your client file name>.cpp.out
Copy this file into testcases/output
-8. run runAllTests.sh again. This time you should get your test passed
- with SUCCESS.
+6. Next time you should get your test passed
+ with SUCCESS.
This time the build/<Your client file name>.cpp.out matchs correctly
with the pre created output in testcases/output
1.6 +0 -15 ws-axis/c/tests/auto_build/autoBuildCVS.sh
Index: autoBuildCVS.sh
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/autoBuildCVS.sh,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- autoBuildCVS.sh 3 Sep 2004 04:24:00 -0000 1.5
+++ autoBuildCVS.sh 3 Sep 2004 12:29:16 -0000 1.6
@@ -111,13 +111,6 @@
echo "running the tests"
sh ./runAllTests.sh
-echo "running the uddi_inquire test"
-sed -e 's/localhost/www-3.ibm.com/g' -e 's/9090/80/g' testcases/platform/linux/test.config > ./test.config
-cp -f test.config testcases/platform/linux
-sh runTest.sh testcases/wsdls/inquire_v2.wsdl c++
-sed 's/www-3.ibm.com/localhost/g' testcases/platform/linux/test.config > ./test.config
-cp -f test.config testcases/platform/linux
-
# *** Deploy with Apache 1 ***
echo "Start deploy with apache1 using expat parser library"
@@ -140,13 +133,5 @@
echo "running the tests"
sh runAllTests.sh
-echo "running the uddi_inquire test"
-sed -e 's/localhost/www-3.ibm.com/g' -e 's/9090/80/g' testcases/platform/linux/test.config > ./test.config
-cp -f test.config testcases/platform/linux
-sh runTest.sh testcases/wsdls/inquire_v2.wsdl c++
-sed 's/www-3.ibm.com/localhost/g' testcases/platform/linux/test.config > ./test.config
-cp -f test.config testcases/platform/linux
-
-#done
1.4 +1 -1 ws-axis/c/tests/auto_build/runAllTests.sh
Index: runAllTests.sh
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/runAllTests.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- runAllTests.sh 3 Sep 2004 08:24:55 -0000 1.3
+++ runAllTests.sh 3 Sep 2004 12:29:16 -0000 1.4
@@ -38,7 +38,7 @@
do
runTestCase.sh "$X" c++
[[ $? -eq 0 ]] && passed=$(($passed + 1))
-num_tests=${num_tests}+1;
+num_tests= expr ${num_tests}+1;
done
echo -n "${passed}/${num_tests} tests passed."
1.3 +8 -3 ws-axis/c/tests/auto_build/testcases/platform/linux/runTestCase.sh
Index: runTestCase.sh
===================================================================
RCS file: /home/cvs/ws-axis/c/tests/auto_build/testcases/platform/linux/runTestCase.sh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- runTestCase.sh 31 Aug 2004 10:20:42 -0000 1.2
+++ runTestCase.sh 3 Sep 2004 12:29:16 -0000 1.3
@@ -6,7 +6,10 @@
# arg 2 : language (c/c++)
mkdir -p $OUTPUT_DIR
-
+SERVICE_HOST=$(echo $(basename $1 .wsdl):host=)
+SERVICE_PORT=$(echo $(basename $1 .wsdl):port=)
+echo $SERVICE_HOST > service_host
+echo $SERVICE_PORT > service_port
URI=
# If a config file exists then alter the endpoint to use the config data
if [ -f "$SERVICE_CONFIG" ]
@@ -15,8 +18,10 @@
# point to a different server and/or port
URI=$(grep -F soap:address $1 | cut -d\" -f2)
CONTEXT=$(echo $URI | cut -d\" -f2 | cut -d/ -f4-)
- URI_HOST=$(grep -E "^host=" $SERVICE_CONFIG | cut -d= -f2)
- URI_PORT=$(grep -E "^port=" $SERVICE_CONFIG | cut -d= -f2)
+ URI_HOST=$(grep -f "service_host" $SERVICE_CONFIG | cut -d= -f2)
+ URI_PORT=$(grep -f "service_port" $SERVICE_CONFIG | cut -d= -f2)
+ #URI_HOST=$(grep -E "^host=" $SERVICE_CONFIG | cut -d= -f2)
+ #URI_PORT=$(grep -E "^port=" $SERVICE_CONFIG | cut -d= -f2)
if [ -n "$URI_HOST" -a -n "$URI_PORT" ]
then
#echo "WSDL URI = $URI"