From 129e39fe6878f28ca203c690fab382b7289b334c Mon Sep 17 00:00:00 2001 From: Shwetha-H-Panduranga Date: Tue, 6 Dec 2011 14:25:20 +0530 Subject: Removing all automation files from the repo --- atfexecute.py | 63 ----------------------------------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 atfexecute.py (limited to 'atfexecute.py') diff --git a/atfexecute.py b/atfexecute.py deleted file mode 100644 index a60402b..0000000 --- a/atfexecute.py +++ /dev/null @@ -1,63 +0,0 @@ -"""atfexecute -""" - -import os.path -import sys -import parser -from atfglobals import GlobalObj - -def _execute_testunit(testunit): - """ - *) Parse the testcaseslist file in the 'testunit' and select test cases - specified for testing 'glusterversion' - *) Call Main.py of 'testunit' to execute the testcases. - """ - return_status = 1 - testruninfo_obj = GlobalObj.getTestrunInfoObj() - atfdir = testruninfo_obj.getAtfDir() - testunit_abspath = atfdir + "/TestUnits/" + testunit - - testenvfile = testunit_abspath + "/testenv.cfg" - testcaseslistfile = testunit_abspath + "/testcaseslist" - - if not os.path.exists(testenvfile): - default_testenvfile = atfdir + "testenv.cfg" - if not os.path.exists(testenvfile): - print "Skipping TestUnit %s . TestEnv File Not Found" % testenvfile - return return_status - else: - testenvfile = default_testenvfile - - if not os.path.exists(testcaseslistfile): - print "Skipping TestUnit %s" % testunit - return return_status - else: - testcaseslist = [] - testcasespassed = None - testcasesfailed = None - totaltestcases = None - - testcaseslist = parser.parse_testcaseslist_file(testcaseslistfile) - if not testcaseslist: - print "Skipping TestUnit %s. No testcases to execute" % testunit - return return_status - else: - sys.path.append(testunit_abspath) - import Main - print "Executing TestUnit: %s" % testunit - print "-" * 50 - return_status = Main.main(testenvfile, *testcaseslist) - return return_status - -def execute(): - """ - *) Execute the TestsCases form TestUnits specified in TestRunInfo File - """ - testruninfo_obj = GlobalObj.getTestrunInfoObj() - testunits = testruninfo_obj.getTestUnits() - for testunit in testunits: - _execute_testunit(testunit) - - return 0 - -__all__ = ['execute'] -- cgit