| 1 |
include(AwsTestHarness) |
| 2 |
enable_testing() |
| 3 |
|
| 4 |
file(GLOB TEST_SRC "*.c") |
| 5 |
file(GLOB TEST_HDRS "*.h") |
| 6 |
file(GLOB TESTS ${TEST_HDRS} ${TEST_SRC}) |
| 7 |
|
| 8 |
add_test_case(sdkutils_library_test) |
| 9 |
|
| 10 |
add_test_case(aws_profile_early_property_parse_failure_test) |
| 11 |
add_test_case(aws_profile_missing_bracket_parse_failure_test) |
| 12 |
add_test_case(aws_profile_missing_assignment_parse_failure_test) |
| 13 |
add_test_case(aws_profile_missing_property_key_parse_failure_test) |
| 14 |
add_test_case(aws_profile_early_continuation_parse_failure_test) |
| 15 |
add_test_case(aws_profile_illegal_continuation1_parse_failure_test) |
| 16 |
add_test_case(aws_profile_illegal_continuation2_parse_failure_test) |
| 17 |
add_test_case(aws_profile_illegal_continuation3_parse_failure_test) |
| 18 |
add_test_case(aws_profile_continuation_reset_on_new_profile_parse_failure_test) |
| 19 |
|
| 20 |
add_test_case(aws_profile_empty_test) |
| 21 |
add_test_case(aws_profile_empty_profile_test) |
| 22 |
add_test_case(aws_profile_whitespace_empty_profile_test) |
| 23 |
add_test_case(aws_profile_tab_empty_profile_test) |
| 24 |
add_test_case(aws_profile_single_simple_property_profile_test) |
| 25 |
add_test_case(aws_profile_equal_containing_property_profile_test) |
| 26 |
add_test_case(aws_profile_unicode_containing_property_profile_test) |
| 27 |
add_test_case(aws_profile_multiple_property_profile_test) |
| 28 |
add_test_case(aws_profile_trimmable_property_profile_test) |
| 29 |
add_test_case(aws_profile_empty_property_profile_test) |
| 30 |
add_test_case(aws_profile_multiple_empty_profile_test) |
| 31 |
add_test_case(aws_profile_multiple_profile_test) |
| 32 |
add_test_case(aws_profile_multiple_sections) |
| 33 |
add_test_case(aws_profile_sections_in_credentials_test) |
| 34 |
add_test_case(aws_profile_sso_session_without_name_test) |
| 35 |
add_test_case(aws_profile_services_invalid_prefix_test) |
| 36 |
add_test_case(aws_profile_blank_lines_ignored_test) |
| 37 |
add_test_case(aws_profile_pound_comments_ignored_test) |
| 38 |
add_test_case(aws_profile_semicolon_comments_ignored_test) |
| 39 |
add_test_case(aws_profile_mixed_comments_ignored_test) |
| 40 |
add_test_case(aws_profile_empty_comments_ignored_test) |
| 41 |
add_test_case(aws_profile_profile_adjacent_comment_test) |
| 42 |
add_test_case(aws_profile_value_adjacent_comment_test) |
| 43 |
add_test_case(aws_profile_continued_property_value_test) |
| 44 |
add_test_case(aws_profile_multiline_continued_property_value_test) |
| 45 |
add_test_case(aws_profile_continued_property_value_trim_test) |
| 46 |
add_test_case(aws_profile_continued_property_value_pound_comment_test) |
| 47 |
add_test_case(aws_profile_continued_property_value_semicolon_comment_test) |
| 48 |
add_test_case(aws_profile_duplicate_profiles_merge_test) |
| 49 |
add_test_case(aws_profile_duplicate_properties_last_property_value_test) |
| 50 |
add_test_case(aws_profile_duplicate_profiles_last_property_value_test) |
| 51 |
add_test_case(aws_profile_duplicate_default_profiles_property_resolution1_test) |
| 52 |
add_test_case(aws_profile_duplicate_default_profiles_property_resolution2_test) |
| 53 |
add_test_case(aws_profile_invalid_profile_names_merge_test) |
| 54 |
add_test_case(aws_profile_invalid_property_names_ignored_test) |
| 55 |
add_test_case(aws_profile_all_valid_profile_characters_test) |
| 56 |
add_test_case(aws_profile_all_valid_property_characters_test) |
| 57 |
add_test_case(aws_profile_basic_sub_property_test) |
| 58 |
add_test_case(aws_profile_empty_sub_property_test) |
| 59 |
add_test_case(aws_profile_invalid_sub_property_name_test) |
| 60 |
add_test_case(aws_profile_sub_property_blank_line_test) |
| 61 |
add_test_case(aws_profile_basic_duplicate_merge_test) |
| 62 |
add_test_case(aws_profile_mixed_prefix_default_test) |
| 63 |
add_test_case(aws_profile_override_duplicate_merge_test) |
| 64 |
add_test_case(aws_profile_no_prefix_nondefault_test) |
| 65 |
add_test_case(aws_profile_prefix_credentials_test) |
| 66 |
|
| 67 |
add_test_case(parse_resource_name_test) |
| 68 |
add_test_case(parse_resource_name_failures_test) |
| 69 |
add_test_case(resource_name_tostring_test) |
| 70 |
add_test_case(resource_name_tostring_failure_test) |
| 71 |
add_test_case(resource_name_length_test) |
| 72 |
|
| 73 |
add_test_case(parse_ruleset_from_string) |
| 74 |
add_test_case(test_endpoints_aws_region) |
| 75 |
add_test_case(test_endpoints_default_values) |
| 76 |
add_test_case(test_endpoints_eventbridge) |
| 77 |
add_test_case(test_endpoints_fns) |
| 78 |
add_test_case(test_endpoints_get_attr_type_inference) |
| 79 |
add_test_case(test_endpoints_headers) |
| 80 |
add_test_case(test_endpoints_is_virtual_hostable_s3_bucket) |
| 81 |
add_test_case(test_endpoints_region_override) |
| 82 |
add_test_case(test_endpoints_minimal_ruleset) |
| 83 |
add_test_case(test_endpoints_parse_arn) |
| 84 |
add_test_case(test_endpoints_parse_url) |
| 85 |
add_test_case(test_endpoints_partition_fn) |
| 86 |
add_test_case(test_endpoints_substring) |
| 87 |
add_test_case(test_endpoints_uri_encode) |
| 88 |
add_test_case(test_endpoints_valid_hostlabel) |
| 89 |
add_test_case(test_endpoints_condition_mem_clean_up) |
| 90 |
add_test_case(test_endpoints_custom) |
| 91 |
add_test_case(test_endpoints_string_array) |
| 92 |
add_test_case(test_endpoints_malformed_no_required_default) |
| 93 |
add_test_case(test_endpoints_malformed_regex) |
| 94 |
|
| 95 |
add_test_case(endpoints_uri_normalize_path) |
| 96 |
add_test_case(endpoints_byte_buf_init_from_resolved_templated_string) |
| 97 |
|
| 98 |
add_test_case(endpoints_regex_aws_region_matches) |
| 99 |
add_test_case(endpoints_regex_iso_region_matches) |
| 100 |
add_test_case(endpoints_regex_misc_validation) |
| 101 |
|
| 102 |
add_test_case(endpoints_bdd_loader_basic) |
| 103 |
add_test_case(endpoints_bdd_compiler_loader_roundtrip) |
| 104 |
|
| 105 |
set(TEST_BINARY_NAME ${PROJECT_NAME}-tests) |
| 106 |
generate_test_driver(${TEST_BINARY_NAME}) |
| 107 |
|
| 108 |
add_custom_command(TARGET ${PROJECT_NAME}-tests PRE_BUILD |
| 109 |
COMMAND ${CMAKE_COMMAND} -E copy_directory |
| 110 |
${CMAKE_CURRENT_SOURCE_DIR}/resources $<TARGET_FILE_DIR:${PROJECT_NAME}-tests>) |