Lines Matching +full:tcs +full:- +full:config
29 #include "engine/config.hpp"
32 # include "config.h"
38 #include <atf-c++.hpp>
43 #include "utils/config/tree.ipp"
46 namespace config = utils::config;
68 /// Checks that the default values of a config object match our expectations.
70 /// This fails the test case if any field of the input config object is not
73 /// \param config The configuration to validate.
75 validate_defaults(const config::tree& config) in validate_defaults() argument
79 config.lookup< config::string_node >("architecture")); in validate_defaults()
83 config.lookup< config::positive_int_node >("parallelism")); in validate_defaults()
87 config.lookup< config::string_node >("platform")); in validate_defaults()
89 ATF_REQUIRE(!config.is_set("unprivileged_user")); in validate_defaults()
91 ATF_REQUIRE(config.all_properties("test_suites").empty()); in validate_defaults()
101 const config::tree user_config = engine::default_config(); in ATF_TEST_CASE_BODY()
109 config::tree user_config = engine::default_config(); in ATF_TEST_CASE_BODY()
112 config::error, "parallelism.*Must be a positive integer", in ATF_TEST_CASE_BODY()
115 config::error, "parallelism.*Must be a positive integer", in ATF_TEST_CASE_BODY()
116 user_config.set_string("parallelism", "-1")); in ATF_TEST_CASE_BODY()
123 atf::utils::create_file("config", "syntax(2)\n"); in ATF_TEST_CASE_BODY()
125 const config::tree user_config = engine::load_config(fs::path("config")); in ATF_TEST_CASE_BODY()
136 "config", in ATF_TEST_CASE_BODY()
138 "architecture = 'test-architecture'\n" in ATF_TEST_CASE_BODY()
140 "platform = 'test-platform'\n" in ATF_TEST_CASE_BODY()
144 const config::tree user_config = engine::load_config(fs::path("config")); in ATF_TEST_CASE_BODY()
146 ATF_REQUIRE_EQ("test-architecture", in ATF_TEST_CASE_BODY()
150 ATF_REQUIRE_EQ("test-platform", in ATF_TEST_CASE_BODY()
158 config::properties_map exp_test_suites; in ATF_TEST_CASE_BODY()
168 atf::utils::create_file("config", "this syntax is invalid\n"); in ATF_TEST_CASE_BODY()
171 fs::path("config"))); in ATF_TEST_CASE_BODY()
178 atf::utils::create_file("config", "syntax(123)\n"); in ATF_TEST_CASE_BODY()
181 "Unsupported config version 123", in ATF_TEST_CASE_BODY()
182 engine::load_config(fs::path("config"))); in ATF_TEST_CASE_BODY()
194 ATF_INIT_TEST_CASES(tcs) in ATF_INIT_TEST_CASES() argument
196 ATF_ADD_TEST_CASE(tcs, config__defaults); in ATF_INIT_TEST_CASES()
197 ATF_ADD_TEST_CASE(tcs, config__set__parallelism); in ATF_INIT_TEST_CASES()
198 ATF_ADD_TEST_CASE(tcs, config__load__defaults); in ATF_INIT_TEST_CASES()
199 ATF_ADD_TEST_CASE(tcs, config__load__overrides); in ATF_INIT_TEST_CASES()
200 ATF_ADD_TEST_CASE(tcs, config__load__lua_error); in ATF_INIT_TEST_CASES()
201 ATF_ADD_TEST_CASE(tcs, config__load__bad_syntax__version); in ATF_INIT_TEST_CASES()
202 ATF_ADD_TEST_CASE(tcs, config__load__missing_file); in ATF_INIT_TEST_CASES()