Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Report skipped tests properly #272

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cmake/tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ if(TARGET test_bitcoin)
add_test(NAME ${test_suite_name}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason to even support this? Seems fine to just let devs call $build_dir/test_bitcoin -t suite/case manually for now (just like in autotools)?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows leveraging parallelism when running ctest -j <number_of_jobs>. Basically, this mirrors the behaviour of make check in the master branch.

COMMAND test_bitcoin --run_test=${test_suite_name} --catch_system_error=no
)
set_property(TEST ${test_suite_name} PROPERTY
SKIP_REGULAR_EXPRESSION "no test cases matching filter" "Skipping"
)
endif()
endfunction()

Expand Down
7 changes: 0 additions & 7 deletions src/test/compilerbug_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@

BOOST_AUTO_TEST_SUITE(compilerbug_tests)

// At least one test case is required to avoid the "Test setup error: no test
// cases matching filter or all test cases were disabled" errror.
BOOST_AUTO_TEST_CASE(dummy)
{
BOOST_CHECK(true);
}

#if defined(__GNUC__)
// This block will also be built under clang, which is fine (as it supports noinline)
void __attribute__ ((noinline)) set_one(unsigned char* ptr)
Expand Down
Loading