From 5df20b07bb860f2dc5f245b7cadaead573806bff Mon Sep 17 00:00:00 2001 From: lanqinglong Date: Tue, 13 Oct 2015 09:32:17 +0800 Subject: 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 --- testcases/Controllers/ONOS/Teston/CI/adapters/environment.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'testcases/Controllers') 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) -- cgit 1.2.3-korg