From 30f974a996efbb4b7f7b4fc3a47a1454c3fe80e5 Mon Sep 17 00:00:00 2001 From: MofassirArif Date: Thu, 21 Jan 2016 06:42:23 -0800 Subject: bug fix: result collection bug fix for docker images Change-Id: Ia4ea09b90c7a4f4e3699af456c6d66e85661cc0b Signed-off-by: MofassirArif (cherry picked from commit 971a7c98515a9d83661f5e423f7e8390f35dca59) --- func/cli.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'func/cli.py') 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) -- cgit 1.2.3-korg