mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 11:10:09 +01:00
platform/test: split initialization of platform tests out
test-route-manager soon wants a different initialization
(cherry picked from commit 24288f713a)
This commit is contained in:
parent
643d412688
commit
3b014ddef8
6 changed files with 28 additions and 1 deletions
|
|
@ -246,6 +246,12 @@ test_ip6_address_external (void)
|
|||
free_signal (address_removed);
|
||||
}
|
||||
|
||||
void
|
||||
init_tests (int *argc, char ***argv)
|
||||
{
|
||||
nmtst_init_with_logging (argc, argv, NULL, "ALL");
|
||||
}
|
||||
|
||||
void
|
||||
setup_tests (void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -86,6 +86,12 @@ test_cleanup_internal (void)
|
|||
g_array_unref (routes6);
|
||||
}
|
||||
|
||||
void
|
||||
init_tests (int *argc, char ***argv)
|
||||
{
|
||||
nmtst_init_with_logging (argc, argv, NULL, "ALL");
|
||||
}
|
||||
|
||||
void
|
||||
setup_tests (void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ main (int argc, char **argv)
|
|||
int result;
|
||||
const char *program = *argv;
|
||||
|
||||
nmtst_init_with_logging (&argc, &argv, NULL, "ALL");
|
||||
init_tests (&argc, &argv);
|
||||
|
||||
NM_PRAGMA_WARNING_DISABLE("-Wtautological-compare")
|
||||
if (SETUP == nm_linux_platform_setup && getuid() != 0) {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
#include "nm-fake-platform.h"
|
||||
#include "nm-linux-platform.h"
|
||||
|
||||
#include "nm-test-utils.h"
|
||||
|
||||
#define DEVICE_NAME "nm-test-device"
|
||||
|
||||
#define debug(...) nm_log_dbg (LOGD_PLATFORM, __VA_ARGS__)
|
||||
|
|
@ -43,5 +45,6 @@ void link_callback (NMPlatform *platform, int ifindex, NMPlatformLink *received,
|
|||
|
||||
void run_command (const char *format, ...);
|
||||
|
||||
void init_tests (int *argc, char ***argv);
|
||||
void setup_tests (void);
|
||||
|
||||
|
|
|
|||
|
|
@ -539,6 +539,12 @@ test_external (void)
|
|||
free_signal (link_removed);
|
||||
}
|
||||
|
||||
void
|
||||
init_tests (int *argc, char ***argv)
|
||||
{
|
||||
nmtst_init_with_logging (argc, argv, NULL, "ALL");
|
||||
}
|
||||
|
||||
void
|
||||
setup_tests (void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -311,6 +311,12 @@ test_ip6_route (void)
|
|||
free_signal (route_removed);
|
||||
}
|
||||
|
||||
void
|
||||
init_tests (int *argc, char ***argv)
|
||||
{
|
||||
nmtst_init_with_logging (argc, argv, NULL, "ALL");
|
||||
}
|
||||
|
||||
void
|
||||
setup_tests (void)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue