Example #1
0
def parser_maple_test_config_file(maple_test_cfg_file):
    raw_config = read_config(maple_test_cfg_file)
    test_paths = get_config_value(raw_config, "test-home", "dir")
    if test_paths:
        test_paths = test_paths.replace("\n", "").split(":")
    else:
        test_paths = []
    test_suite_config = {
        "test_paths":
        [complete_path(BASE_DIR / path) for path in test_paths if path],
    }
    log_config = {
        "dir":
        complete_path(BASE_DIR /
                      Path(get_config_value(raw_config, "logging", "name"))),
        "level":
        get_level_name(get_config_value(raw_config, "logging", "level")),
    }

    running_config = {
        "temp_dir":
        complete_path(
            BASE_DIR /
            Path(get_config_value(raw_config, "running", "temp_dir"))),
    }

    return test_suite_config, running_config, log_config
Example #2
0
 def _get_testlist(config, base_dir):
     testlist_path = get_config_value(config, "testlist", "path")
     if testlist_path is None:
         testlist_path = base_dir / "testlist"
     else:
         testlist_path = base_dir / testlist_path
     return testlist_path
Example #3
0
 def _get_testlist(config, base_dir, encoding):
     testlist_path = get_config_value(config, "testlist", "path")
     if testlist_path is None:
         testlist_path = base_dir / "testlist"
     else:
         testlist_path = base_dir / testlist_path
     testlist = read_list(testlist_path, encoding)
     return testlist