Call ssh_init()/ssh_finalize bf/af each testcase
Этот коммит содержится в:
родитель
2faaefade9
Коммит
3f538b3ddd
@ -85,11 +85,15 @@ static void torture_buffer_prepend(void **state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int torture_run_tests(void) {
|
int torture_run_tests(void) {
|
||||||
|
int rc;
|
||||||
const UnitTest tests[] = {
|
const UnitTest tests[] = {
|
||||||
unit_test_setup_teardown(torture_growing_buffer, setup, teardown),
|
unit_test_setup_teardown(torture_growing_buffer, setup, teardown),
|
||||||
unit_test_setup_teardown(torture_growing_buffer_shifting, setup, teardown),
|
unit_test_setup_teardown(torture_growing_buffer_shifting, setup, teardown),
|
||||||
unit_test_setup_teardown(torture_buffer_prepend, setup, teardown),
|
unit_test_setup_teardown(torture_buffer_prepend, setup, teardown),
|
||||||
};
|
};
|
||||||
|
|
||||||
return run_tests(tests);
|
ssh_init();
|
||||||
|
rc=run_tests(tests);
|
||||||
|
ssh_finalize();
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -58,10 +58,14 @@ static void torture_callbacks_exists(void **state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int torture_run_tests(void) {
|
int torture_run_tests(void) {
|
||||||
|
int rc;
|
||||||
const UnitTest tests[] = {
|
const UnitTest tests[] = {
|
||||||
unit_test_setup_teardown(torture_callbacks_size, setup, teardown),
|
unit_test_setup_teardown(torture_callbacks_size, setup, teardown),
|
||||||
unit_test_setup_teardown(torture_callbacks_exists, setup, teardown),
|
unit_test_setup_teardown(torture_callbacks_exists, setup, teardown),
|
||||||
};
|
};
|
||||||
|
|
||||||
return run_tests(tests);
|
ssh_init();
|
||||||
|
rc=run_tests(tests);
|
||||||
|
ssh_finalize();
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -232,6 +232,7 @@ static void torture_privatekey_from_file_passphrase(void **state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int torture_run_tests(void) {
|
int torture_run_tests(void) {
|
||||||
|
int rc;
|
||||||
const UnitTest tests[] = {
|
const UnitTest tests[] = {
|
||||||
unit_test_setup_teardown(torture_pubkey_from_file,
|
unit_test_setup_teardown(torture_pubkey_from_file,
|
||||||
setup_rsa_key,
|
setup_rsa_key,
|
||||||
@ -245,5 +246,9 @@ int torture_run_tests(void) {
|
|||||||
setup_both_keys_passphrase, teardown),
|
setup_both_keys_passphrase, teardown),
|
||||||
};
|
};
|
||||||
|
|
||||||
return run_tests(tests);
|
|
||||||
|
ssh_init();
|
||||||
|
rc=run_tests(tests);
|
||||||
|
ssh_finalize();
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -77,11 +77,15 @@ static void torture_ssh_list_prepend(void **state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int torture_run_tests(void) {
|
int torture_run_tests(void) {
|
||||||
|
int rc;
|
||||||
const UnitTest tests[] = {
|
const UnitTest tests[] = {
|
||||||
unit_test(torture_ssh_list_new),
|
unit_test(torture_ssh_list_new),
|
||||||
unit_test(torture_ssh_list_append),
|
unit_test(torture_ssh_list_append),
|
||||||
unit_test(torture_ssh_list_prepend),
|
unit_test(torture_ssh_list_prepend),
|
||||||
};
|
};
|
||||||
|
|
||||||
return run_tests(tests);
|
ssh_init();
|
||||||
|
rc=run_tests(tests);
|
||||||
|
ssh_finalize();
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -157,6 +157,7 @@ static void torture_path_expand_known_hosts(void **state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int torture_run_tests(void) {
|
int torture_run_tests(void) {
|
||||||
|
int rc;
|
||||||
const UnitTest tests[] = {
|
const UnitTest tests[] = {
|
||||||
unit_test(torture_get_user_home_dir),
|
unit_test(torture_get_user_home_dir),
|
||||||
unit_test(torture_basename),
|
unit_test(torture_basename),
|
||||||
@ -171,5 +172,8 @@ int torture_run_tests(void) {
|
|||||||
unit_test_setup_teardown(torture_path_expand_known_hosts, setup, teardown),
|
unit_test_setup_teardown(torture_path_expand_known_hosts, setup, teardown),
|
||||||
};
|
};
|
||||||
|
|
||||||
return run_tests(tests);
|
ssh_init();
|
||||||
|
rc=run_tests(tests);
|
||||||
|
ssh_finalize();
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -119,6 +119,7 @@ static void torture_options_set_identity(void **state) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int torture_run_tests(void) {
|
int torture_run_tests(void) {
|
||||||
|
int rc;
|
||||||
const UnitTest tests[] = {
|
const UnitTest tests[] = {
|
||||||
unit_test_setup_teardown(torture_options_set_host, setup, teardown),
|
unit_test_setup_teardown(torture_options_set_host, setup, teardown),
|
||||||
unit_test_setup_teardown(torture_options_set_port, setup, teardown),
|
unit_test_setup_teardown(torture_options_set_port, setup, teardown),
|
||||||
@ -127,5 +128,8 @@ int torture_run_tests(void) {
|
|||||||
unit_test_setup_teardown(torture_options_set_identity, setup, teardown),
|
unit_test_setup_teardown(torture_options_set_identity, setup, teardown),
|
||||||
};
|
};
|
||||||
|
|
||||||
return run_tests(tests);
|
ssh_init();
|
||||||
|
rc=run_tests(tests);
|
||||||
|
ssh_finalize();
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user