aboutsummaryrefslogtreecommitdiffstats
path: root/func/cli.py
diff options
context:
space:
mode:
authorzhifeng.jiang <jiang.zhifeng@zte.com.cn>2016-09-04 10:03:03 +0800
committerzhifeng jiang <jiang.zhifeng@zte.com.cn>2016-09-08 11:23:35 +0000
commit6612d7c20e329cd5b133a41a6b35c67539f3369b (patch)
tree9d977adb46d347b980b0f49756e5607907d346fe /func/cli.py
parentcf0b4338abd0dc4f8a835440db7c662a37e92911 (diff)
Remove os environment in driver.py so that it can be called by restful server
modification: Change os environments to parameters in driver.py Pass the parameters in cli.py and arg_handler.py JIRA:QTIP-97 Change-Id: Id67acb7e0ac46fa9e0e32481e947055b6d37dd95 Signed-off-by: zhifeng.jiang <jiang.zhifeng@zte.com.cn>
Diffstat (limited to 'func/cli.py')
-rw-r--r--func/cli.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/func/cli.py b/func/cli.py
index 01694a9b..66ab2277 100644
--- a/func/cli.py
+++ b/func/cli.py
@@ -8,6 +8,7 @@
##############################################################################
import sys
+import os
import args_handler
import argparse
@@ -37,12 +38,12 @@ class cli:
args = self._parse_args(args)
if not args_handler.check_suit_in_test_list(args.file):
- print '\n\n ERROR: Test File Does not exist in test_list/ please enter correct file \n\n'
+ print('\n\n ERROR: Test File Does not exist in test_list/ please enter correct file \n\n')
sys.exit(0)
if not args_handler.check_lab_name(args.lab):
- print '\n\n You have specified a lab that is not present in test_cases/ please enter \
- correct file. If unsure how to proceed, use -l default.\n\n'
+ print('\n\n You have specified a lab that is not present in test_cases/ please enter \
+ correct file. If unsure how to proceed, use -l default.\n\n')
sys.exit(0)
suite = args.file
benchmarks = args_handler.get_files_in_test_list(suite)
@@ -50,6 +51,7 @@ class cli:
benchmarks_list = filter(lambda x: x in test_cases, benchmarks)
map(lambda x: args_handler.prepare_and_run_benchmark(
+ os.environ['INSTALLER_TYPE'], os.environ['PWD'],
args_handler.get_benchmark_path(args.lab.lower(), suite, x)), benchmarks_list)
print('{0} is not a Template in the Directory Enter a Valid file name.'