test: parameterize the message, region, channel and option tests by transport

- Turn the per-transport TEST() copies into TEST_P() suites:
  Messages, ShmMessages, Regions, ConnectedPeers and Options
- The test names change, e.g. Resize.shmem_expanded_metadata is now
  Messages.Resize/shmem_expanded_metadata

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-03 14:41:46 +00:00
committed by Dennis Klein
parent 6a55bf1d55
commit 5da5a35b4d
4 changed files with 48 additions and 114 deletions

View File

@@ -15,6 +15,7 @@
#include <fairmq/TransportFactory.h>
#include <fairmq/tools/Unique.h>
#include <helper/Transport.h>
#include <helper/TransportParam.h>
#include <gtest/gtest.h>
#include <memory>
#include <sstream>
@@ -100,15 +101,14 @@ void ZeroingAndMlockOnCreation(const string& transport)
ASSERT_EQ(memcmp(test.data(), outMsg->GetData(), outMsg->GetSize()), 0);
}
TEST(Options, zeromq) // NOLINT
using Options = test::TransportTest;
TEST_P(Options, Apply) // NOLINT
{
RunOptionsTest("zeromq");
RunOptionsTest(GetParam().transport);
}
TEST(Options, shmem) // NOLINT
{
RunOptionsTest("shmem");
}
INSTANTIATE_TEST_SUITE_P(, Options, test::BasicTransports(), test::TransportParamName());
TEST(ZeroingAndMlock, shmem) // NOLINT
{