summary refs log tree commit diff
path: root/clients/common/tests
diff options
context:
space:
mode:
Diffstat (limited to 'clients/common/tests')
-rw-r--r--clients/common/tests/meson.build50
-rw-r--r--clients/common/tests/test-clients-common.c17
-rw-r--r--clients/common/tests/test-libnm-core-aux.c18
3 files changed, 29 insertions, 56 deletions
diff --git a/clients/common/tests/meson.build b/clients/common/tests/meson.build
index 624dd89c..479cb781 100644
--- a/clients/common/tests/meson.build
+++ b/clients/common/tests/meson.build
@@ -1,43 +1,43 @@
+common_c_flags = clients_c_flags + ['-DNETWORKMANAGER_COMPILATION_TEST']
+
 test_name = 'test-clients-common'
 
+deps = [
+  libnmc_base_dep,
+  libnmc_dep,
+]
+
 exe = executable(
   test_name,
   test_name + '.c',
-  dependencies: [
-    libnm_dep,
-    libnmc_dep,
-    libnmc_base_dep,
-    libnm_core_dep,
-  ],
-  c_args: clients_cflags + [
-    '-DNETWORKMANAGER_COMPILATION_TEST',
-  ],
+  dependencies: deps,
+  c_args: common_c_flags,
 )
 
 test(
-  test_name,
+  'clients/common/tests/' + test_name,
   test_script,
   args: test_args + [exe.full_path()],
 )
 
-###############################################################################
+test_name = 'test-libnm-core-aux'
+
+deps = [
+  libnm_dep,
+  libnm_libnm_core_aux_dep,
+  libnm_nm_default_dep,
+]
 
 exe = executable(
-    'test-libnm-core-aux',
-    [ 'test-libnm-core-aux.c', ],
-    c_args: [
-        '-DNETWORKMANAGER_COMPILATION_TEST',
-        '-DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_CLIENT',
-    ],
-    dependencies: [
-        libnm_dep,
-        shared_nm_libnm_core_aux_dep,
-        shared_nm_libnm_core_intern_dep,
-    ],
+  test_name,
+  test_name + '.c',
+  dependencies: deps,
+  c_args: common_c_flags,
+  link_with: libnm_systemd_logging_stub,
 )
 
 test(
-    'clients/common/tests/test-libnm-core-aux',
-    test_script,
-    args: test_args + [exe.full_path()]
+  'clients/common/tests/' + test_name,
+  test_script,
+  args: test_args + [exe.full_path()]
 )
diff --git a/clients/common/tests/test-clients-common.c b/clients/common/tests/test-clients-common.c
index 75233acd..a5d803df 100644
--- a/clients/common/tests/test-clients-common.c
+++ b/clients/common/tests/test-clients-common.c
@@ -1,19 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Copyright 2017 Red Hat, Inc.
+ * Copyright (C) 2017 Red Hat, Inc.
  */
 
 #include "nm-default.h"
diff --git a/clients/common/tests/test-libnm-core-aux.c b/clients/common/tests/test-libnm-core-aux.c
index 609a688c..7acbc6e1 100644
--- a/clients/common/tests/test-libnm-core-aux.c
+++ b/clients/common/tests/test-libnm-core-aux.c
@@ -1,20 +1,6 @@
+// SPDX-License-Identifier: LGPL-2.1+
 /*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301 USA.
- *
- * Copyright 2019 Red Hat, Inc.
+ * Copyright (C) 2019 Red Hat, Inc.
  */
 
 #include "nm-default.h"