Beispiel #1
0
def tc_load(action):
    """Load data tools arguments"""

    from storagetest.tests.mnt.loadgen import LoadGenTC
    case_info_dict = LoadGenTC().get_case_name_desc()
    case_desc = case_dict_2_string(case_info_dict, 25)
    mnt_p = MntParser()
    parser = action.add_parser(
        'load',
        help='storage->mnt load data file tools',
        epilog='Test Case List:\n{0}'.format(case_desc),
        formatter_class=argparse.RawDescriptionHelpFormatter,
        parents=[
            mnt_p.test_path, mnt_p.dir_number, mnt_p.file_number,
            mnt_p.file_size_range,
            exclude_case()
        ])
    parser.add_argument("--case",
                        action="store",
                        dest="case_list",
                        default=['all'],
                        nargs='+',
                        choices=case_info_dict.keys(),
                        help="default:['all]")
    parser.set_defaults(func=test_suite_generator,
                        loops=1,
                        suite='load',
                        runner="TextTestRunner")
Beispiel #2
0
def tc_sanity(action):
    from storagetest.tests.cloud.sanity import SanityTC
    case_info_dict = SanityTC().get_case_name_desc()
    case_desc = case_dict_2_string(case_info_dict, 25)

    parser = action.add_parser(
        'sanity',
        help='storage->cloud sanity test',
        epilog='Test Case List:\n{0}'.format(case_desc),
        formatter_class=argparse.RawDescriptionHelpFormatter,
        parents=[MntParser().test_path, exclude_case()])
    parser.add_argument("--case",
                        action="store",
                        dest="case_list",
                        default=['all'],
                        nargs='+',
                        choices=case_info_dict.keys(),
                        help="default:['all]")
    parser.set_defaults(func=test_suite_generator, suite='sanity')
Beispiel #3
0
def tc_sanity(action):
    case_info_dict = {
        'ut': 'RAW device write/read unit test',
    }

    case_desc = case_dict_2_string(case_info_dict, 25)
    raw_p = RawParser()
    parser = action.add_parser(
        'sanity',
        help='storage->raw sanity test',
        epilog='Test Case List:\n{0}'.format(case_desc),
        formatter_class=argparse.RawDescriptionHelpFormatter,
        parents=[raw_p.sanity, exclude_case()]
    )
    parser.add_argument("--case", action="store", dest="case_list",
                        default=['all'], nargs='+',
                        choices=case_info_dict.keys(),
                        help="default:['all]")
    parser.set_defaults(func=test_suite_generator, suite='sanity')
Beispiel #4
0
def tc_benchmark(action):
    """Benchmark test arguments"""
    from storagetest.tests.mnt.benchmark import BenchMarkTC
    case_info_dict = BenchMarkTC().get_case_name_desc()
    case_desc = case_dict_2_string(case_info_dict, 25)

    parser = action.add_parser(
        'benchmark',
        help='storage->mnt benchmark test',
        epilog='Test Case List:\n{0}'.format(case_desc),
        formatter_class=argparse.RawDescriptionHelpFormatter,
        parents=[MntParser().test_path, exclude_case()])
    parser.add_argument("--case",
                        action="store",
                        dest="case_list",
                        default=['all'],
                        nargs='+',
                        choices=case_info_dict.keys(),
                        help="default:['all]")
    parser.set_defaults(func=test_suite_generator, loops=1, suite='benchmark')