Skip to content

Commit

Permalink
tests: Improve parse_target_triple warning regex.
Browse files Browse the repository at this point in the history
Improve the regex, to ensure it only matches against our specific
warning. This should hopefully make it more robust, since
new CMake versions can always introduce new warnings for our
existing code.
  • Loading branch information
jschwe committed Jan 12, 2025
1 parent 113f047 commit 6b0c1a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parse_target_triple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ corrosion_tests_add_test(parse_target_triple "")
corrosion_tests_add_test(parse_target_triple_should_fail "")

set_tests_properties("parse_target_triple_build" PROPERTIES FAIL_REGULAR_EXPRESSION
"CMake Warning"
"CMake Warning at [^\r\n]*FindRust\.cmake:.*(\r)?\n[ \t]*Failed to parse target-triple `"
)

set_tests_properties("parse_target_triple_should_fail_build" PROPERTIES PASS_REGULAR_EXPRESSION
"CMake Warning"
)
"CMake Warning at [^\r\n]*FindRust\.cmake:.*(\r)?\n[ \t]*Failed to parse target-triple `"
)

0 comments on commit 6b0c1a9

Please sign in to comment.