Creating subfolders for test suites
allow teston to look in subfolders
create subfolders for current test suites
move tests into sub folders
create HA suite dependencies folder and moved all common files there
minor driver and test updates
standardize on the name dependencies for the directory
change from admin to sdn users
Conflicts:
TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.topo
Change-Id: I849e45ab67da8b285c36c5fdf43b34323876e741
diff --git a/TestON/core/teston.py b/TestON/core/teston.py
index 76f7842..eb8c0ba 100644
--- a/TestON/core/teston.py
+++ b/TestON/core/teston.py
@@ -219,8 +219,7 @@
self.CASERESULT = self.NORESULT
import testparser
- testFile = self.tests_path + "/" + self.TEST + "/" + self.TEST + ".py"
- test = testparser.TestParser( testFile )
+ test = testparser.TestParser( main.testFile )
self.testscript = test.testscript
self.code = test.getStepCode()
repeat = int( self.params.get( 'repeat', 1 ) )
@@ -622,8 +621,7 @@
This method will parse the test script to find required test
information.
'''
- testFile = self.tests_path + "/" + self.TEST + "/" + self.TEST + ".py"
- testFileHandler = open( testFile, 'r' )
+ testFileHandler = open( main.testFile, 'r' )
testFileList = testFileHandler.readlines()
testFileHandler.close()
counter = 0
@@ -887,12 +885,25 @@
Verifyies test script.
'''
main.openspeak = openspeak.OpenSpeak()
- openspeakfile = main.testDir + "/" + main.TEST + "/" + main.TEST + ".ospk"
- testfile = main.testDir + "/" + main.TEST + "/" + main.TEST + ".py"
+ directory = main.testDir + "/" + main.TEST
+ if os.path.exists( directory ):
+ pass
+ else:
+ directory = ""
+ for root, dirs, files in os.walk( main.testDir, topdown=True):
+ if not directory:
+ for name in dirs:
+ if name == main.TEST:
+ directory = ( os.path.join( root, name ) )
+ index = directory.find( "/tests/" ) + 1
+ main.classPath = directory[index:].replace( '/', '.' ) + "." + main.TEST
+ break
+ openspeakfile = directory + "/" + main.TEST + ".ospk"
+ main.testFile = directory + "/" + main.TEST + ".py"
if os.path.exists( openspeakfile ):
# Openspeak file found, compiling to python
main.openspeak.compiler( openspeakfile=openspeakfile, writetofile=1 )
- elif os.path.exists( testfile ):
+ elif os.path.exists( main.testFile ):
# No openspeak found, using python file instead
pass
else: