You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hise-commits@incubator.apache.org by rr...@apache.org on 2010/07/09 16:42:16 UTC
svn commit: r962607 - /incubator/hise/trunk/itest/itest
Author: rr
Date: Fri Jul 9 16:42:16 2010
New Revision: 962607
URL: http://svn.apache.org/viewvc?rev=962607&view=rev
Log:
Added integration test script
Added:
incubator/hise/trunk/itest/itest (with props)
Added: incubator/hise/trunk/itest/itest
URL: http://svn.apache.org/viewvc/incubator/hise/trunk/itest/itest?rev=962607&view=auto
==============================================================================
--- incubator/hise/trunk/itest/itest (added)
+++ incubator/hise/trunk/itest/itest Fri Jul 9 16:42:16 2010
@@ -0,0 +1,63 @@
+#!/usr/bin/python
+#
+# 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.
+
+import pexpect
+import os
+import sys
+import time
+import re
+
+def syscall(c):
+ if os.system(c) != 0:
+ raise Exception("Sys call failed: " + c)
+
+baseDir=os.getcwd()
+os.system("rm -fr results")
+
+SMX4_DIR=os.getenv("SMX4_DIR")
+SOAPUI_DIR=os.getenv("SOAPUI_DIR")
+
+os.chdir(SMX4_DIR)
+os.system("rm -fr data")
+os.system("rm -f hise*")
+child = pexpect.spawn("bin/servicemix")
+child.logfile = sys.stdout
+child.expect("karaf.*>")
+time.sleep(3)
+child.sendline("features:addUrl mvn:org.apache.hise/hise-karaf/0.3.0-SNAPSHOT/xml/features");
+child.expect("karaf.*>")
+child.sendline("features:install hise-h2-test-example-osgi")
+child.expect("karaf.*>")
+time.sleep(3)
+
+rep=0
+while True:
+ child.sendline("osgi:list|grep -i hise-test-example-osgi")
+ l=child.readline()
+ l=child.readline()
+ if re.match(".*Active", l) != None:
+ break
+ time.sleep(1)
+ rep=rep+1
+ if rep>30:
+ raise Exception("Bundle not installed")
+
+os.chdir(baseDir)
+syscall(SOAPUI_DIR + "/bin/testrunner.sh -f results hise-soapui-project.xml")
+child.sendline("shutdown")
+time.sleep(3)
+
Propchange: incubator/hise/trunk/itest/itest
------------------------------------------------------------------------------
svn:executable = *