aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/Controllers/ONOS
diff options
context:
space:
mode:
authorlanqinglong <lanqinglong@huawei.com>2015-10-13 09:32:17 +0800
committerlanqinglong <lanqinglong@huawei.com>2015-10-13 20:53:37 +0800
commit5df20b07bb860f2dc5f245b7cadaead573806bff (patch)
treecddba07ed470869c7607cf5027ee80165fbaf0b7 /testcases/Controllers/ONOS
parentd9f2b10c12895db9501d26431b3b6f2e4b3d0e9c (diff)
Write a simple adapter in functest project to run TESTON
JIRA:FUNCTEST-46 Add Env function: replace onos file Add log folder Change-Id: Ice2679ccf00258dfb206ab252590ec586b1d2c9d Signed-off-by: lanqinglong <lanqinglong@huawei.com>
Diffstat (limited to 'testcases/Controllers/ONOS')
-rw-r--r--testcases/Controllers/ONOS/Teston/CI/adapters/environment.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/testcases/Controllers/ONOS/Teston/CI/adapters/environment.py b/testcases/Controllers/ONOS/Teston/CI/adapters/environment.py
index 01e72cd4a..ea1a836da 100644
--- a/testcases/Controllers/ONOS/Teston/CI/adapters/environment.py
+++ b/testcases/Controllers/ONOS/Teston/CI/adapters/environment.py
@@ -22,6 +22,7 @@ class environment( connection ):
connection.__init__( self )
self.loginfo = connection( )
self.masterhandle = ''
+ self.home = ''
def DownLoadCode( self, handle, codeurl ):
"""
@@ -202,6 +203,12 @@ class environment( connection ):
#Release ssh
handle.logout()
+ def CopyOnostoTestbin( self ):
+ sourcefile = os.curdir + '/dependencies/onos'
+ destifile = self.home + '/onos/tools/test/bin/'
+ runcommand = 'cp ' + sourcefile + ' ' + destifile
+ os.system( runcommand )
+
def OnosEnvSetup( self, handle ):
"""
Onos Environment Setup function
@@ -213,6 +220,7 @@ class environment( connection ):
self.AddKnownHost( handle, self.OC3, "karaf", "karaf" )
self.DownLoadCode( handle, 'https://github.com/sunyulin/OnosSystemTest.git' )
self.DownLoadCode( handle, 'https://gerrit.onosproject.org/onos' )
+ self.CopyOnostoTestbin()
self.ChangeOnosName(self.agentusername,self.agentpassword)
self.InstallDefaultSoftware( handle )
- self.SetOnosEnvVar(handle, self.masterpassword,self.agentpassword) \ No newline at end of file
+ self.SetOnosEnvVar(handle, self.masterpassword,self.agentpassword)