Lines Matching +full:tcs +full:- +full:config

43 #include <atf-c++.hpp>
45 #include "engine/config.hpp"
52 #include "utils/config/tree.ipp"
70 namespace config = utils::config;
129 /// wasn't because doing so deletes on-disk files and we want to leave them
147 atf::utils::create_file("second-file", ""); in exec_create_files_and_fail()
160 const int exit_code = ::system("rm *") == -1 in exec_delete_all()
192 /// \param vars User-provided variables to pass to the test program.
196 const config::properties_map& vars) const in exec_print_params()
201 for (config::properties_map::const_iterator iter = vars.begin(); in exec_print_params()
219 /// \param vars User-provided variables to pass to the test program.
222 const config::properties_map& vars) in exec_list()
247 for (config::properties_map::const_iterator iter = vars.begin(); in exec_list()
308 /// \param vars User-provided variables to pass to the test program.
314 const config::properties_map& vars, in exec_test()
364 const config::properties_map& /* vars */, in exec_cleanup()
418 // Only sanity-check the work directory-related parameters in case in compute_result()
470 const config::tree& user_config = engine::empty_config()) in check_integration_list()
473 "mock", fs::path(test_name), root, "the-suite") in check_integration_list()
488 config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
489 user_config.set_string("test_suites.the-suite.first", "test"); in ATF_TEST_CASE_BODY()
490 user_config.set_string("test_suites.the-suite.second", "TEST"); in ATF_TEST_CASE_BODY()
537 const model::test_case& test_case = test_cases.begin()->second; in ATF_TEST_CASE_BODY()
553 const model::test_case& test_case = test_cases.begin()->second; in ATF_TEST_CASE_BODY()
566 "mock", fs::path("the-program"), fs::current_path(), "the-suite") in ATF_TEST_CASE_BODY()
569 const config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
580 ATF_REQUIRE_EQ(exec_handle, result_handle->original_pid()); in ATF_TEST_CASE_BODY()
582 test_result_handle->test_result()); in ATF_TEST_CASE_BODY()
583 result_handle->cleanup(); in ATF_TEST_CASE_BODY()
595 const config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
616 "mock", fs::path(F("program-%s") % i), in ATF_TEST_CASE_BODY()
617 fs::current_path(), "the-suite") in ATF_TEST_CASE_BODY()
664 result_handle->original_pid(); in ATF_TEST_CASE_BODY()
667 exec_handle)->second; in ATF_TEST_CASE_BODY()
669 exec_handle)->second; in ATF_TEST_CASE_BODY()
671 exec_handle)->second; in ATF_TEST_CASE_BODY()
672 const int exit_status = exp_exit_statuses.find(exec_handle)->second; in ATF_TEST_CASE_BODY()
676 test_result_handle->test_result()); in ATF_TEST_CASE_BODY()
678 ATF_REQUIRE_EQ(test_program, test_result_handle->test_program()); in ATF_TEST_CASE_BODY()
679 ATF_REQUIRE_EQ(test_case_name, test_result_handle->test_case_name()); in ATF_TEST_CASE_BODY()
681 ATF_REQUIRE_EQ(start_time, result_handle->start_time()); in ATF_TEST_CASE_BODY()
682 ATF_REQUIRE_EQ(end_time, result_handle->end_time()); in ATF_TEST_CASE_BODY()
684 result_handle->cleanup(); in ATF_TEST_CASE_BODY()
687 result_handle->stdout_file().str())); in ATF_TEST_CASE_BODY()
689 result_handle->stderr_file().str())); in ATF_TEST_CASE_BODY()
691 result_handle->work_directory().str())); in ATF_TEST_CASE_BODY()
707 "mock", fs::path("dir2/dir3/program"), fs::path("dir1"), "the-suite") in ATF_TEST_CASE_BODY()
719 test_result_handle->test_result()); in ATF_TEST_CASE_BODY()
721 result_handle->cleanup(); in ATF_TEST_CASE_BODY()
732 "mock", fs::path("the-program"), fs::current_path(), "the-suite") in ATF_TEST_CASE_BODY()
735 config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
736 user_config.set_string("test_suites.the-suite.one", "first variable"); in ATF_TEST_CASE_BODY()
737 user_config.set_string("test_suites.the-suite.two", "second variable"); in ATF_TEST_CASE_BODY()
749 ATF_REQUIRE_EQ(exec_handle, result_handle->original_pid()); in ATF_TEST_CASE_BODY()
750 ATF_REQUIRE_EQ(program, test_result_handle->test_program()); in ATF_TEST_CASE_BODY()
751 ATF_REQUIRE_EQ("print_params", test_result_handle->test_case_name()); in ATF_TEST_CASE_BODY()
753 test_result_handle->test_result()); in ATF_TEST_CASE_BODY()
755 const fs::path stdout_file = result_handle->stdout_file(); in ATF_TEST_CASE_BODY()
758 "Test program: the-program\n" in ATF_TEST_CASE_BODY()
762 const fs::path stderr_file = result_handle->stderr_file(); in ATF_TEST_CASE_BODY()
766 result_handle->cleanup(); in ATF_TEST_CASE_BODY()
786 "mock", fs::path("the-program"), fs::current_path(), "the-suite", in ATF_TEST_CASE_BODY()
789 const config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
799 ATF_REQUIRE_EQ(fake_result, test_result_handle->test_result()); in ATF_TEST_CASE_BODY()
800 result_handle->cleanup(); in ATF_TEST_CASE_BODY()
811 "mock", fs::path("the-program"), fs::current_path(), "the-suite") in ATF_TEST_CASE_BODY()
814 .add_required_config("variable-that-does-not-exist") in ATF_TEST_CASE_BODY()
819 const config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
832 "'variable-that-does-not-exist' not defined"), in ATF_TEST_CASE_BODY()
833 test_result_handle->test_result()); in ATF_TEST_CASE_BODY()
835 result_handle->stdout_file().str())); in ATF_TEST_CASE_BODY()
836 result_handle->cleanup(); in ATF_TEST_CASE_BODY()
852 "mock", fs::path("the-program"), fs::current_path(), "the-suite") in do_cleanup_test()
857 const config::tree user_config = engine::empty_config(); in do_cleanup_test()
867 ATF_REQUIRE_EQ(exp_result, test_result_handle->test_result()); in do_cleanup_test()
869 result_handle->stdout_file().str(), in do_cleanup_test()
871 result_handle->cleanup(); in do_cleanup_test()
930 "mock", fs::path("the-program"), fs::current_path(), "the-suite") in ATF_TEST_CASE_BODY()
936 const config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
949 test_result_handle->test_result()); in ATF_TEST_CASE_BODY()
950 result_handle->cleanup(); in ATF_TEST_CASE_BODY()
963 "mock", fs::path("the-program"), fs::current_path(), "the-suite") in ATF_TEST_CASE_BODY()
964 .add_test_case("unknown-dumps-core").build_ptr(); in ATF_TEST_CASE_BODY()
966 const config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
970 (void)handle.spawn_test(program, "unknown-dumps-core", user_config); in ATF_TEST_CASE_BODY()
978 test_result_handle->test_result()); in ATF_TEST_CASE_BODY()
980 result_handle->stdout_file().str())); in ATF_TEST_CASE_BODY()
982 result_handle->stderr_file().str())); in ATF_TEST_CASE_BODY()
983 result_handle->cleanup(); in ATF_TEST_CASE_BODY()
998 "mock", fs::path("the-program"), fs::current_path(), "the-suite") in do_check_list_files_on_failure()
1001 const config::tree user_config = engine::empty_config(); in do_check_list_files_on_failure()
1008 atf::utils::cat_file(result_handle->stdout_file().str(), "child stdout: "); in do_check_list_files_on_failure()
1009 ATF_REQUIRE(atf::utils::compare_file(result_handle->stdout_file().str(), in do_check_list_files_on_failure()
1011 atf::utils::cat_file(result_handle->stderr_file().str(), "child stderr: "); in do_check_list_files_on_failure()
1012 ATF_REQUIRE(atf::utils::compare_file(result_handle->stderr_file().str(), in do_check_list_files_on_failure()
1014 result_handle->cleanup(); in do_check_list_files_on_failure()
1035 "dir1, first file, second-file\n"); in ATF_TEST_CASE_BODY()
1043 "mock", fs::path("the-program"), fs::current_path(), "the-suite") in ATF_TEST_CASE_BODY()
1046 const config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
1057 test_result_handle->test_result()); in ATF_TEST_CASE_BODY()
1058 result_handle->cleanup(); in ATF_TEST_CASE_BODY()
1069 "mock", fs::path("the-program"), fs::current_path(), "the-suite") in ATF_TEST_CASE_BODY()
1072 config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
1073 user_config.set_string("test_suites.the-suite.one", "first variable"); in ATF_TEST_CASE_BODY()
1074 user_config.set_string("test_suites.the-suite.two", "second variable"); in ATF_TEST_CASE_BODY()
1078 const fs::path stdout_file("custom-stdout.txt"); in ATF_TEST_CASE_BODY()
1079 const fs::path stderr_file("custom-stderr.txt"); in ATF_TEST_CASE_BODY()
1087 ATF_REQUIRE_EQ(program, test_result_handle->test_program()); in ATF_TEST_CASE_BODY()
1088 ATF_REQUIRE_EQ("print_params", test_result_handle->test_case_name()); in ATF_TEST_CASE_BODY()
1090 test_result_handle->test_result()); in ATF_TEST_CASE_BODY()
1094 ATF_REQUIRE(stdout_file != result_handle->stdout_file()); in ATF_TEST_CASE_BODY()
1095 ATF_REQUIRE(stderr_file != result_handle->stderr_file()); in ATF_TEST_CASE_BODY()
1097 result_handle->cleanup(); in ATF_TEST_CASE_BODY()
1104 "Test program: the-program\n" in ATF_TEST_CASE_BODY()
1157 const config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
1159 const config::properties_map exp_props; in ATF_TEST_CASE_BODY()
1169 config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
1173 const config::properties_map exp_props; in ATF_TEST_CASE_BODY()
1187 config::tree user_config = engine::empty_config(); in ATF_TEST_CASE_BODY()
1193 config::properties_map exp_props; in ATF_TEST_CASE_BODY()
1194 exp_props["unprivileged-user"] = "nobody"; in ATF_TEST_CASE_BODY()
1203 ATF_INIT_TEST_CASES(tcs) in ATF_INIT_TEST_CASES() argument
1208 ATF_ADD_TEST_CASE(tcs, integration__list_some); in ATF_INIT_TEST_CASES()
1209 ATF_ADD_TEST_CASE(tcs, integration__list_check_paths); in ATF_INIT_TEST_CASES()
1210 ATF_ADD_TEST_CASE(tcs, integration__list_timeout); in ATF_INIT_TEST_CASES()
1211 ATF_ADD_TEST_CASE(tcs, integration__list_fail); in ATF_INIT_TEST_CASES()
1212 ATF_ADD_TEST_CASE(tcs, integration__list_empty); in ATF_INIT_TEST_CASES()
1214 ATF_ADD_TEST_CASE(tcs, integration__run_one); in ATF_INIT_TEST_CASES()
1215 ATF_ADD_TEST_CASE(tcs, integration__run_many); in ATF_INIT_TEST_CASES()
1217 ATF_ADD_TEST_CASE(tcs, integration__run_check_paths); in ATF_INIT_TEST_CASES()
1218 ATF_ADD_TEST_CASE(tcs, integration__parameters_and_output); in ATF_INIT_TEST_CASES()
1220 ATF_ADD_TEST_CASE(tcs, integration__fake_result); in ATF_INIT_TEST_CASES()
1221 ATF_ADD_TEST_CASE(tcs, integration__cleanup__head_skips); in ATF_INIT_TEST_CASES()
1222 ATF_ADD_TEST_CASE(tcs, integration__cleanup__body_skips); in ATF_INIT_TEST_CASES()
1223 ATF_ADD_TEST_CASE(tcs, integration__cleanup__body_ok__cleanup_bad); in ATF_INIT_TEST_CASES()
1224 ATF_ADD_TEST_CASE(tcs, integration__cleanup__body_bad__cleanup_ok); in ATF_INIT_TEST_CASES()
1225 ATF_ADD_TEST_CASE(tcs, integration__cleanup__body_bad__cleanup_bad); in ATF_INIT_TEST_CASES()
1226 ATF_ADD_TEST_CASE(tcs, integration__cleanup__timeout); in ATF_INIT_TEST_CASES()
1227 ATF_ADD_TEST_CASE(tcs, integration__check_requirements); in ATF_INIT_TEST_CASES()
1228 ATF_ADD_TEST_CASE(tcs, integration__stacktrace); in ATF_INIT_TEST_CASES()
1229 ATF_ADD_TEST_CASE(tcs, integration__list_files_on_failure__none); in ATF_INIT_TEST_CASES()
1230 ATF_ADD_TEST_CASE(tcs, integration__list_files_on_failure__some); in ATF_INIT_TEST_CASES()
1231 ATF_ADD_TEST_CASE(tcs, integration__prevent_clobbering_control_files); in ATF_INIT_TEST_CASES()
1233 ATF_ADD_TEST_CASE(tcs, debug_test); in ATF_INIT_TEST_CASES()
1235 ATF_ADD_TEST_CASE(tcs, ensure_valid_interface); in ATF_INIT_TEST_CASES()
1236 ATF_ADD_TEST_CASE(tcs, registered_interface_names); in ATF_INIT_TEST_CASES()
1238 ATF_ADD_TEST_CASE(tcs, current_context); in ATF_INIT_TEST_CASES()
1240 ATF_ADD_TEST_CASE(tcs, generate_config__empty); in ATF_INIT_TEST_CASES()
1241 ATF_ADD_TEST_CASE(tcs, generate_config__no_matches); in ATF_INIT_TEST_CASES()
1242 ATF_ADD_TEST_CASE(tcs, generate_config__some_matches); in ATF_INIT_TEST_CASES()