mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-08 11:03:25 -08:00
[CI] Pin used GH Actions (#7716)
* pin used actions plus some reordering and harmonization across files * [CI] Link the version string and RNG stub into the test targets The distribution libgtest.a now used by the Linux images makes the linker pull more translation units out of libcockatrice_network than the fetched googletest did. Those units reference VERSION_STRING and the global rng, which several test targets never defined, so the instrumented Ubuntu 26.04 legs failed at link: undefined reference to `VERSION_STRING' undefined reference to `rng' Add the generated version string source wherever a test links the network umbrella, and define the rng stub in the tests that pull the server game classes without declaring it. This matches what the neighbouring server tests already do. A full Debug build and ctest suite in the ci-ubuntu2604 image (system libgtest.a) is green: 841 tests pass. Fixes the nightly failures introduced by #6894. --------- Co-authored-by: Lukas Brübach <44814898+BruebachL@users.noreply.github.com>
This commit is contained in:
parent
1ca67ebb0f
commit
aa0c8dc7cb
13 changed files with 107 additions and 73 deletions
|
|
@ -300,6 +300,7 @@ cockatrice_add_test(
|
|||
NAME
|
||||
server_card_counter_test
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
server_card_counter_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network
|
||||
|
|
@ -310,6 +311,7 @@ cockatrice_add_test(
|
|||
NAME
|
||||
server_dump_zone_test
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
server_dump_zone_test.cpp
|
||||
LIBS
|
||||
libcockatrice_rng
|
||||
|
|
@ -321,6 +323,7 @@ cockatrice_add_test(
|
|||
NAME
|
||||
server_counter_test
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
server_counter_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network
|
||||
|
|
@ -332,6 +335,7 @@ cockatrice_add_test(
|
|||
server_developer_role_test
|
||||
NO_SANITIZE
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
server_developer_role_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network
|
||||
|
|
@ -344,6 +348,7 @@ cockatrice_add_test(
|
|||
server_moderator_role_test
|
||||
NO_SANITIZE
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
server_moderator_role_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network
|
||||
|
|
@ -390,6 +395,7 @@ cockatrice_add_test(
|
|||
NAME
|
||||
local_client_lifetime_test
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
local_client_lifetime_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network
|
||||
|
|
@ -411,6 +417,7 @@ cockatrice_add_test(
|
|||
NAME
|
||||
latency_tracker_test
|
||||
SOURCES
|
||||
${VERSION_STRING_CPP}
|
||||
latency_tracker_test.cpp
|
||||
LIBS
|
||||
libcockatrice_network
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@
|
|||
#include <QMetaObject>
|
||||
#include <QString>
|
||||
#include <gtest/gtest.h>
|
||||
#include <libcockatrice/rng/rng_abstract.h>
|
||||
|
||||
// Referenced by other translation units in the server_remote library.
|
||||
RNG_Abstract *rng = nullptr;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,8 +7,12 @@
|
|||
#include <climits>
|
||||
#include <gtest/gtest.h>
|
||||
#include <libcockatrice/network/server/remote/game/dump_zone_range.h>
|
||||
#include <libcockatrice/rng/rng_abstract.h>
|
||||
#include <vector>
|
||||
|
||||
// Referenced by other translation units in the server_remote library.
|
||||
RNG_Abstract *rng = nullptr;
|
||||
|
||||
namespace
|
||||
{
|
||||
/// Indices a dump request resolves to, as the handler would walk them.
|
||||
|
|
|
|||
|
|
@ -9,12 +9,16 @@
|
|||
#include <QStringLiteral>
|
||||
#include <QTemporaryDir>
|
||||
#include <gtest/gtest.h>
|
||||
#include <libcockatrice/rng/rng_abstract.h>
|
||||
#include <string>
|
||||
|
||||
// Owned by main.cpp in the real application; pixel_map_generator.cpp references
|
||||
// it, so the test binary needs a definition even though it never renders.
|
||||
ThemeManager *themeManager = nullptr;
|
||||
|
||||
// Referenced by other translation units in the server_remote library.
|
||||
RNG_Abstract *rng = nullptr;
|
||||
|
||||
namespace
|
||||
{
|
||||
const QString LEGACY = QStringLiteral("Default");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue