mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
tests: Do not recreate unnecessary files for every test case
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
42ce989488
commit
31bc83f366
@@ -402,33 +402,19 @@ static void torture_config_match(void **state)
|
|||||||
int torture_run_tests(void) {
|
int torture_run_tests(void) {
|
||||||
int rc;
|
int rc;
|
||||||
struct CMUnitTest tests[] = {
|
struct CMUnitTest tests[] = {
|
||||||
cmocka_unit_test_setup_teardown(torture_config_from_file,
|
cmocka_unit_test(torture_config_from_file),
|
||||||
setup_config_files,
|
cmocka_unit_test(torture_config_double_ports),
|
||||||
teardown),
|
cmocka_unit_test(torture_config_glob),
|
||||||
cmocka_unit_test_setup_teardown(torture_config_double_ports,
|
cmocka_unit_test(torture_config_new),
|
||||||
setup_config_files,
|
cmocka_unit_test(torture_config_auth_methods),
|
||||||
teardown),
|
cmocka_unit_test(torture_config_unknown),
|
||||||
cmocka_unit_test_setup_teardown(torture_config_glob,
|
cmocka_unit_test(torture_config_match),
|
||||||
setup_config_files,
|
|
||||||
teardown),
|
|
||||||
cmocka_unit_test_setup_teardown(torture_config_new,
|
|
||||||
setup_config_files,
|
|
||||||
teardown),
|
|
||||||
cmocka_unit_test_setup_teardown(torture_config_auth_methods,
|
|
||||||
setup_config_files,
|
|
||||||
teardown),
|
|
||||||
cmocka_unit_test_setup_teardown(torture_config_unknown,
|
|
||||||
setup_config_files,
|
|
||||||
teardown),
|
|
||||||
cmocka_unit_test_setup_teardown(torture_config_match,
|
|
||||||
setup_config_files,
|
|
||||||
teardown),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
ssh_init();
|
ssh_init();
|
||||||
torture_filter_tests(tests);
|
torture_filter_tests(tests);
|
||||||
rc = cmocka_run_group_tests(tests, NULL, NULL);
|
rc = cmocka_run_group_tests(tests, setup_config_files, teardown);
|
||||||
ssh_finalize();
|
ssh_finalize();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user