diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2016-10-08 01:27:10 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-10-08 01:27:10 +0000 |
commit | 4603be9ac48b48be0d39e8473c30f17d0ff86388 (patch) | |
tree | 707541134c788db9cfb3d44906c9404f72d0a102 | |
parent | a5ec8f76b940183ba78f7086c0bb20053422dc67 (diff) | |
parent | bfc96872dde7b0074b576a2ce384c808588193c1 (diff) |
Merge "Rename `suit` to `suite`"
-rw-r--r-- | func/args_handler.py | 12 | ||||
-rw-r--r-- | func/cli.py | 2 | ||||
-rw-r--r-- | restful_server/qtip_server.py | 4 |
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 81ce941e..565a0e5d 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'])) |