aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2016-10-07 16:33:44 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2016-10-07 16:33:44 +0800
commitbfc96872dde7b0074b576a2ce384c808588193c1 (patch)
treeabac196e959e6fbe3e6f58d04c26b061b0fa7446
parent33d953b9c4a7ecada927af3b1666d15e3f389beb (diff)
Rename `suit` to `suite`
We should use correct words for naming. Change-Id: Ia1ec690fca62259b5f226e2d6941a507cc61786e Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
-rw-r--r--func/args_handler.py12
-rw-r--r--func/cli.py2
-rw-r--r--restful_server/qtip_server.py4
3 files changed, 9 insertions, 9 deletions
diff --git a/func/args_handler.py b/func/args_handler.py
index e27d37e7..59712800 100644
--- a/func/args_handler.py
+++ b/func/args_handler.py
@@ -14,14 +14,14 @@ from func.spawn_vm import SpawnVM
from func.driver import Driver
-def get_files_in_test_list(suit_name, case_type='all'):
- benchmark_list = json.load(file('test_list/{0}'.format(suit_name)))
+def get_files_in_test_list(suite_name, case_type='all'):
+ benchmark_list = json.load(file('test_list/{0}'.format(suite_name)))
return reduce(add, benchmark_list.values()) \
if case_type == 'all' else benchmark_list[case_type]
-def get_files_in_test_case(lab, suit_name, case_type='all'):
- test_case_all = os.listdir('./test_cases/{0}/{1}'.format(lab, suit_name))
+def get_files_in_test_case(lab, suite_name, case_type='all'):
+ test_case_all = os.listdir('./test_cases/{0}/{1}'.format(lab, suite_name))
return test_case_all if case_type == 'all' else \
filter(lambda x: case_type in x, test_case_all)
@@ -30,8 +30,8 @@ def get_benchmark_path(lab, suit, benchmark):
return './test_cases/{0}/{1}/{2}'.format(lab, suit, benchmark)
-def check_suit_in_test_list(suit_name):
- return True if os.path.isfile('test_list/' + suit_name) else False
+def check_suite_in_test_list(suite_name):
+ return True if os.path.isfile('test_list/' + suite_name) else False
def check_lab_name(lab_name):
diff --git a/func/cli.py b/func/cli.py
index 833437d5..9222da51 100644
--- a/func/cli.py
+++ b/func/cli.py
@@ -40,7 +40,7 @@ class cli:
def __init__(self, args=sys.argv[1:]):
args = self._parse_args(args)
- if not args_handler.check_suit_in_test_list(args.file):
+ if not args_handler.check_suite_in_test_list(args.file):
print('\n\n ERROR: Test File Does not exist in test_list/ please enter correct file \n\n')
sys.exit(1)
diff --git a/restful_server/qtip_server.py b/restful_server/qtip_server.py
index 734a471c..c22c6123 100644
--- a/restful_server/qtip_server.py
+++ b/restful_server/qtip_server.py
@@ -130,8 +130,8 @@ default is 'compute'
parser.add_argument('suite_name', type=str, required=False, default='compute', help='suite_name should be string')
parser.add_argument('type', type=str, required=False, default='BM', help='type should be BM, VM and ALL')
args = parser.parse_args()
- if not args_handler.check_suit_in_test_list(args["suite_name"]):
- return abort(404, 'message:Test Suit {0} does not exist in test_list'.format(args["suite_name"]))
+ if not args_handler.check_suite_in_test_list(args["suite_name"]):
+ return abort(404, 'message:Test suite {0} does not exist in test_list'.format(args["suite_name"]))
if not args_handler.check_lab_name(args["pod_name"]):
return abort(404, 'message: You have specified a lab {0}\
that is not present in test_cases'.format(args['pod_name']))