summaryrefslogtreecommitdiffstats
path: root/atfexecute.py
diff options
context:
space:
mode:
authorShwetha-H-Panduranga <shwetha@gluster.com>2011-12-06 14:25:20 +0530
committerShwetha-H-Panduranga <shwetha@gluster.com>2011-12-06 14:25:20 +0530
commit129e39fe6878f28ca203c690fab382b7289b334c (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /atfexecute.py
parent18445ae1a94366c955cc7626fb8ec749dedcf73e (diff)
Removing all automation files from the repo
Diffstat (limited to 'atfexecute.py')
-rw-r--r--atfexecute.py63
1 files changed, 0 insertions, 63 deletions
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']