diff options
author | MofassirArif <Mofassir_Arif@dellteam.com> | 2016-01-21 06:42:23 -0800 |
---|---|---|
committer | Nauman Ahad <nauman.ahad@xflowresearch.com> | 2016-02-01 22:27:40 +0000 |
commit | 30f974a996efbb4b7f7b4fc3a47a1454c3fe80e5 (patch) | |
tree | ee1d930fca39fa6875de6e18a2ae3dd9dba6f70f /func/cli.py | |
parent | c013d5c523c42221f2c3594f0a751e9181b80a6b (diff) |
bug fix: result collection bug fix for docker images
Change-Id: Ia4ea09b90c7a4f4e3699af456c6d66e85661cc0b
Signed-off-by: MofassirArif <Mofassir_Arif@dellteam.com>
(cherry picked from commit 971a7c98515a9d83661f5e423f7e8390f35dca59)
Diffstat (limited to 'func/cli.py')
-rw-r--r-- | func/cli.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/func/cli.py b/func/cli.py index b8718407..9b140874 100644 --- a/func/cli.py +++ b/func/cli.py @@ -16,21 +16,21 @@ import argparse class cli(): - + def _getfile(self, filepath): - + with open('test_list/'+filepath,'r') as finput: _benchmarks=finput.readlines() for items in range( len(_benchmarks)): _benchmarks[items]=_benchmarks[items].rstrip() return _benchmarks - + def _getsuite(self, filepath): return filepath - + def _checkTestList(self, filename): - + if os.path.isfile('test_list/'+filename): return True else: @@ -44,7 +44,7 @@ class cli(): return False def __init__(self): - + suite=[] parser = argparse.ArgumentParser() parser.add_argument('-l ', '--lab', help='Name of Lab on which being tested, These can' \ @@ -60,7 +60,7 @@ class cli(): 'They contain all the tests that will be run. They are listed by suite.' \ 'Please ensure there are no empty lines') args = parser.parse_args() - + if not self._checkTestList(args.file): print '\n\n ERROR: Test File Does not exist in test_list/ please enter correct file \n\n' sys.exit(0) @@ -85,7 +85,7 @@ class cli(): if os.path.isfile('./test_cases/'+args.lab.lower()+'/'+suite[0]+'/' +benchmarks[items]): [benchmark, roles, vm_info, benchmark_details, pip] = obj.parse('./test_cases/' +args.lab.lower()+'/'+suite[0]+'/'+benchmarks[items]) - + if len(vm_info) != 0: vmObj ='' vmObj = SpawnVM(vm_info) |