[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 01/03: meson: Fix build with recent testing changes.
From: |
gnunet |
Subject: |
[gnunet] 01/03: meson: Fix build with recent testing changes. |
Date: |
Wed, 29 Nov 2023 16:46:02 +0100 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit 6a4207ac3987df455499102e9d094f9eb2347cf3
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Wed Nov 29 16:43:31 2023 +0100
meson: Fix build with recent testing changes.
---
meson.build | 6 +-
src/service/core/meson.build | 1 +
src/service/testing/meson.build | 2 -
src/service/transport/meson.build | 387 +++++++++++++++---------
src/service/transport/test_communicator_basic.c | 18 +-
5 files changed, 251 insertions(+), 163 deletions(-)
diff --git a/meson.build b/meson.build
index 9db38740d..f604bd67f 100644
--- a/meson.build
+++ b/meson.build
@@ -424,8 +424,10 @@ subdir('data')
meson.add_dist_script('meson-dist-script')
-add_test_setup('default', env: ['GNUNET_PREFIX='/get_option('libdir')],
exclude_suites: ['perf'], is_default: true)
-add_test_setup('full', env: ['GNUNET_PREFIX='/get_option('libdir')],
is_default: false)
+gnunet_prefix = get_option('prefix')/get_option('libdir')
+
+add_test_setup('default', env: ['GNUNET_PREFIX='+gnunet_prefix],
exclude_suites: ['perf'], is_default: true)
+add_test_setup('full', env: ['GNUNET_PREFIX='+gnunet_prefix], is_default:
false)
summary({'host': host_machine.system(),
'prefix': get_option('prefix'),
diff --git a/src/service/core/meson.build b/src/service/core/meson.build
index 483aa0a11..6f7ff7404 100644
--- a/src/service/core/meson.build
+++ b/src/service/core/meson.build
@@ -35,6 +35,7 @@ libgnunetcoretesting = library('gnunetcoretesting',
['core_api_cmd_connecting_peers.c'],
dependencies: [
libgnunetutil_dep,
+ libgnunettransporttesting2_dep,
libgnunettesting_dep,
libgnunetarm_dep,
libgnunettransportapplication_dep,
diff --git a/src/service/testing/meson.build b/src/service/testing/meson.build
index 5605a2afb..ea8956c1b 100644
--- a/src/service/testing/meson.build
+++ b/src/service/testing/meson.build
@@ -1,6 +1,4 @@
libgnunettesting_src = [
- 'testing_api_cmd_stop_peer.c',
- 'testing_api_cmd_start_peer.c',
'testing_api_cmd_exec_bash_script.c',
'testing_api_cmd_barrier.c',
'testing_api_cmd_barrier_reached.c',
diff --git a/src/service/transport/meson.build
b/src/service/transport/meson.build
index 3cacc53f6..c4e94aa13 100644
--- a/src/service/transport/meson.build
+++ b/src/service/transport/meson.build
@@ -27,80 +27,80 @@ if get_option('monolith')
endif
libgnunettransportapplication = library('gnunettransportapplication',
- libgnunettransportapplication_src,
- soversion: '0',
- version: '0.0.0',
- dependencies: libgnunetutil_dep,
- include_directories: [incdir, configuration_inc],
- install: true,
- install_dir: get_option('libdir'))
+ libgnunettransportapplication_src,
+ soversion: '0',
+ version: '0.0.0',
+ dependencies: libgnunetutil_dep,
+ include_directories: [incdir,
configuration_inc],
+ install: true,
+ install_dir: get_option('libdir'))
pkg.generate(libgnunettransportapplication, url: 'https://www.gnunet.org',
description : 'Provides application APIs for accessing the
transport service')
libgnunettransportapplication_dep = declare_dependency(link_with :
libgnunettransportapplication)
libgnunettransportcore = library('gnunettransportcore',
- libgnunettransportcore_src,
- soversion: '0',
- version: '0.0.0',
- dependencies: libgnunetutil_dep,
- include_directories: [incdir, configuration_inc],
- install: true,
- install_dir: get_option('libdir'))
+ libgnunettransportcore_src,
+ soversion: '0',
+ version: '0.0.0',
+ dependencies: libgnunetutil_dep,
+ include_directories: [incdir,
configuration_inc],
+ install: true,
+ install_dir: get_option('libdir'))
pkg.generate(libgnunettransportcore, url: 'https://www.gnunet.org',
description : 'Provides core API for accessing the transport
service')
libgnunettransportcore_dep = declare_dependency(link_with :
libgnunettransportcore)
libgnunettransportcommunicator = library('gnunettransportcommunicator',
- libgnunettransportcommunicator_src,
- soversion: '0',
- version: '0.0.0',
- dependencies: libgnunetutil_dep,
- include_directories: [incdir, configuration_inc],
- install: true,
- install_dir: get_option('libdir'))
+ libgnunettransportcommunicator_src,
+ soversion: '0',
+ version: '0.0.0',
+ dependencies: libgnunetutil_dep,
+ include_directories: [incdir,
configuration_inc],
+ install: true,
+ install_dir: get_option('libdir'))
pkg.generate(libgnunettransportcommunicator, url: 'https://www.gnunet.org',
description : 'Provides communicator API for accessing the
transport service')
libgnunettransportcommunicator_dep = declare_dependency(link_with :
libgnunettransportcommunicator)
libgnunettransportmonitor = library('gnunettransportmonitor',
- libgnunettransportmonitor_src,
- soversion: '0',
- version: '0.0.0',
- dependencies: libgnunetutil_dep,
- include_directories: [incdir, configuration_inc],
- install: true,
- install_dir: get_option('libdir'))
+ libgnunettransportmonitor_src,
+ soversion: '0',
+ version: '0.0.0',
+ dependencies: libgnunetutil_dep,
+ include_directories: [incdir,
configuration_inc],
+ install: true,
+ install_dir: get_option('libdir'))
pkg.generate(libgnunettransportmonitor, url: 'https://www.gnunet.org',
description : 'Provides monitor API for accessing the transport
service')
libgnunettransportmonitor_dep = declare_dependency(link_with :
libgnunettransportmonitor)
libgnunettransporttesting2 = library('gnunettransporttesting2',
- [
- 'transport_api_traits.c',
- 'transport_api_cmd_connecting_peers.c',
- 'transport_api_cmd_backchannel_check.c',
- 'transport_api_cmd_start_peer.c',
- 'transport_api_cmd_stop_peer.c',
- 'transport_api_cmd_send_simple.c',
- 'transport_api_cmd_send_simple_performance.c',
- 'transport-testing2.c',
- 'transport-testing-filenames2.c',
- 'transport-testing-loggers2.c',
- 'transport-testing-main2.c',
- 'transport-testing-send2.c',
- 'transport-testing-communicator.c',
- ],
- soversion: '0',
- version: '0.0.0',
- dependencies: [libgnunetutil_dep,
- libgnunettransportcore_dep,
- libgnunettransportapplication_dep,
- libgnunetpeerstore_dep,
- libgnunettesting_dep,
- libgnunethello_dep],
- include_directories: [incdir, configuration_inc],
- install: true,
- install_dir: get_option('libdir'))
+ [
+ 'transport_api_traits.c',
+ 'transport_api_cmd_connecting_peers.c',
+ 'transport_api_cmd_backchannel_check.c',
+ 'transport_api_cmd_start_peer.c',
+ 'transport_api_cmd_stop_peer.c',
+ 'transport_api_cmd_send_simple.c',
+
'transport_api_cmd_send_simple_performance.c',
+ 'transport-testing2.c',
+ 'transport-testing-filenames2.c',
+ 'transport-testing-loggers2.c',
+ 'transport-testing-main2.c',
+ 'transport-testing-send2.c',
+ 'transport-testing-communicator.c',
+ ],
+ soversion: '0',
+ version: '0.0.0',
+ dependencies: [libgnunetutil_dep,
+ libgnunettransportcore_dep,
+
libgnunettransportapplication_dep,
+ libgnunetpeerstore_dep,
+ libgnunettesting_dep,
+ libgnunethello_dep],
+ include_directories: [incdir,
configuration_inc],
+ install: true,
+ install_dir: get_option('libdir'))
libgnunettransporttesting2_dep = declare_dependency(link_with :
libgnunettransporttesting2)
executable ('gnunet-service-transport',
@@ -153,109 +153,196 @@ executable ('gnunet-communicator-tcp',
install_dir: get_option('libdir') / 'gnunet' / 'libexec')
libgnunettesttransport_cmd_simplesend =
library('gnunet_test_transport_plugin_cmd_simple_send',
- ['test_transport_plugin_cmd_simple_send.c'],
- dependencies: [
- libgnunetutil_dep,
- libgnunettransportapplication_dep,
- libgnunettransporttesting2_dep,
- libgnunettransportcore_dep,
- libgnunettesting_dep,
- libgnunetpeerstore_dep,
- libgnunetstatistics_dep,
- libgnunethello_dep,
- libgnunetarm_dep,
- libgnunetutil_dep
- ],
- include_directories: [incdir, configuration_inc],
- install: true,
- install_dir: get_option('libdir')/'gnunet')
+
['test_transport_plugin_cmd_simple_send.c'],
+ dependencies: [
+ libgnunetutil_dep,
+
libgnunettransportapplication_dep,
+
libgnunettransporttesting2_dep,
+ libgnunettransportcore_dep,
+ libgnunettesting_dep,
+ libgnunetpeerstore_dep,
+ libgnunetstatistics_dep,
+ libgnunethello_dep,
+ libgnunetarm_dep,
+ libgnunetutil_dep
+ ],
+ include_directories: [incdir,
configuration_inc],
+ install: true,
+ install_dir:
get_option('libdir')/'gnunet')
libgnunettesttransport_cmd_simplesendbc =
library('gnunet_test_transport_plugin_cmd_simple_send_broadcast',
- ['test_transport_plugin_cmd_simple_send_broadcast.c'],
- dependencies: [
- libgnunetutil_dep,
- libgnunettransportapplication_dep,
- libgnunettransporttesting2_dep,
- libgnunettransportcore_dep,
- libgnunettesting_dep,
- libgnunetpeerstore_dep,
- libgnunetstatistics_dep,
- libgnunethello_dep,
- libgnunetarm_dep,
- libgnunetutil_dep
- ],
- include_directories: [incdir, configuration_inc],
- install: true,
- install_dir: get_option('libdir')/'gnunet')
+
['test_transport_plugin_cmd_simple_send_broadcast.c'],
+ dependencies: [
+ libgnunetutil_dep,
+
libgnunettransportapplication_dep,
+
libgnunettransporttesting2_dep,
+ libgnunettransportcore_dep,
+ libgnunettesting_dep,
+ libgnunetpeerstore_dep,
+ libgnunetstatistics_dep,
+ libgnunethello_dep,
+ libgnunetarm_dep,
+ libgnunetutil_dep
+ ],
+ include_directories:
[incdir, configuration_inc],
+ install: true,
+ install_dir:
get_option('libdir')/'gnunet')
libgnunettesttransport_cmd_simplesenddv =
library('gnunet_test_transport_plugin_cmd_simple_send_dv',
- ['test_transport_plugin_cmd_simple_send_dv.c'],
- dependencies: [
- libgnunetutil_dep,
- libgnunettransportapplication_dep,
- libgnunettransporttesting2_dep,
- libgnunettransportcore_dep,
- libgnunettesting_dep,
- libgnunetpeerstore_dep,
- libgnunetstatistics_dep,
- libgnunethello_dep,
- libgnunetarm_dep,
- libgnunetutil_dep
- ],
- include_directories: [incdir, configuration_inc],
- install: true,
- install_dir: get_option('libdir')/'gnunet')
+
['test_transport_plugin_cmd_simple_send_dv.c'],
+ dependencies: [
+ libgnunetutil_dep,
+
libgnunettransportapplication_dep,
+
libgnunettransporttesting2_dep,
+ libgnunettransportcore_dep,
+ libgnunettesting_dep,
+ libgnunetpeerstore_dep,
+ libgnunetstatistics_dep,
+ libgnunethello_dep,
+ libgnunetarm_dep,
+ libgnunetutil_dep
+ ],
+ include_directories:
[incdir, configuration_inc],
+ install: true,
+ install_dir:
get_option('libdir')/'gnunet')
libgnunettesttransport_cmd_simplesendperf =
library('gnunet_test_transport_plugin_cmd_simple_send_performance',
- ['test_transport_plugin_cmd_simple_send_performance.c'],
- dependencies: [
- libgnunetutil_dep,
- libgnunettransportapplication_dep,
- libgnunettransporttesting2_dep,
- libgnunettransportcore_dep,
- libgnunettesting_dep,
- libgnunetpeerstore_dep,
- libgnunetstatistics_dep,
- libgnunethello_dep,
- libgnunetarm_dep,
- libgnunetutil_dep
- ],
- include_directories: [incdir, configuration_inc],
- install: true,
- install_dir: get_option('libdir')/'gnunet')
+
['test_transport_plugin_cmd_simple_send_performance.c'],
+ dependencies: [
+ libgnunetutil_dep,
+
libgnunettransportapplication_dep,
+
libgnunettransporttesting2_dep,
+
libgnunettransportcore_dep,
+ libgnunettesting_dep,
+ libgnunetpeerstore_dep,
+ libgnunetstatistics_dep,
+ libgnunethello_dep,
+ libgnunetarm_dep,
+ libgnunetutil_dep
+ ],
+ include_directories:
[incdir, configuration_inc],
+ install: true,
+ install_dir:
get_option('libdir')/'gnunet')
libgnunettesttransport_cmd_udpback =
library('gnunet_test_transport_plugin_cmd_udp_backchannel',
- ['test_transport_plugin_cmd_udp_backchannel.c'],
- dependencies: [
- libgnunetutil_dep,
- libgnunettransporttesting2_dep,
- libgnunettransportapplication_dep,
- libgnunettransportcore_dep,
- libgnunettesting_dep,
- libgnunetpeerstore_dep,
- libgnunetstatistics_dep,
- libgnunethello_dep,
- libgnunetarm_dep,
- libgnunetutil_dep
- ],
- include_directories: [incdir, configuration_inc],
- install: true,
- install_dir: get_option('libdir')/'gnunet')
+
['test_transport_plugin_cmd_udp_backchannel.c'],
+ dependencies: [
+ libgnunetutil_dep,
+ libgnunettransporttesting2_dep,
+
libgnunettransportapplication_dep,
+ libgnunettransportcore_dep,
+ libgnunettesting_dep,
+ libgnunetpeerstore_dep,
+ libgnunetstatistics_dep,
+ libgnunethello_dep,
+ libgnunetarm_dep,
+ libgnunetutil_dep
+ ],
+ include_directories: [incdir,
configuration_inc],
+ install: true,
+ install_dir:
get_option('libdir')/'gnunet')
libgnunettesttransport_cmd_natupnp =
library('gnunet_test_transport_plugin_cmd_nat_upnp',
- ['test_transport_plugin_cmd_nat_upnp.c'],
- dependencies: [
- libgnunetutil_dep,
- libgnunettransportapplication_dep,
- libgnunettransporttesting2_dep,
- libgnunettransportcore_dep,
- libgnunettesting_dep,
- libgnunetpeerstore_dep,
- libgnunetstatistics_dep,
- libgnunethello_dep,
- libgnunetarm_dep,
- libgnunetutil_dep
- ],
- include_directories: [incdir, configuration_inc],
- install: true,
- install_dir: get_option('libdir')/'gnunet')
+
['test_transport_plugin_cmd_nat_upnp.c'],
+ dependencies: [
+ libgnunetutil_dep,
+
libgnunettransportapplication_dep,
+ libgnunettransporttesting2_dep,
+ libgnunettransportcore_dep,
+ libgnunettesting_dep,
+ libgnunetpeerstore_dep,
+ libgnunetstatistics_dep,
+ libgnunethello_dep,
+ libgnunetarm_dep,
+ libgnunetutil_dep
+ ],
+ include_directories: [incdir,
configuration_inc],
+ install: true,
+ install_dir:
get_option('libdir')/'gnunet')
+foreach p : ['unix', 'tcp', 'udp']
+ configure_file(input : 'test_communicator_'+p+'_basic_peer1.conf',
+ output : 'test_communicator_'+p+'_basic_peer1.conf',
+ copy: true)
+ configure_file(input : 'test_communicator_'+p+'_basic_peer2.conf',
+ output : 'test_communicator_'+p+'_basic_peer2.conf',
+ copy: true)
+endforeach
+
+testcommunicator_basic_unix = executable('test_communicator_basic-unix',
+ ['test_communicator_basic.c'],
+ dependencies: [
+ libgnunetutil_dep,
+ libgnunettransportapplication_dep,
+ libgnunettransporttesting2_dep,
+ libgnunettransportcore_dep,
+ libgnunettesting_dep,
+ libgnunetpeerstore_dep,
+ libgnunetstatistics_dep,
+ libgnunethello_dep,
+ libgnunetarm_dep,
+ libgnunetutil_dep
+ ],
+ include_directories: [incdir,
configuration_inc],
+ install: false)
+testcommunicator_basic_tcp = executable('test_communicator_basic-tcp',
+ ['test_communicator_basic.c'],
+ dependencies: [
+ libgnunetutil_dep,
+ libgnunettransportapplication_dep,
+ libgnunettransporttesting2_dep,
+ libgnunettransportcore_dep,
+ libgnunettesting_dep,
+ libgnunetpeerstore_dep,
+ libgnunetstatistics_dep,
+ libgnunethello_dep,
+ libgnunetarm_dep,
+ libgnunetutil_dep
+ ],
+ include_directories: [incdir,
configuration_inc],
+ install: false)
+testcommunicator_basic_udp = executable('test_communicator_basic-udp',
+ ['test_communicator_basic.c'],
+ dependencies: [
+ libgnunetutil_dep,
+ libgnunettransportapplication_dep,
+ libgnunettransporttesting2_dep,
+ libgnunettransportcore_dep,
+ libgnunettesting_dep,
+ libgnunetpeerstore_dep,
+ libgnunetstatistics_dep,
+ libgnunethello_dep,
+ libgnunetarm_dep,
+ libgnunetutil_dep
+ ],
+ include_directories: [incdir,
configuration_inc],
+ install: false)
+
+
+
+
+test('test_communicator_basic-unix', testcommunicator_basic_unix,
+ workdir: meson.current_build_dir(),
+ suite: ['transport', 'communicator'])
+test('test_communicator_basic-tcp', testcommunicator_basic_tcp,
+ workdir: meson.current_build_dir(),
+ suite: ['transport', 'communicator'])
+test('test_communicator_basic-udp', testcommunicator_basic_udp,
+ workdir: meson.current_build_dir(),
+ suite: ['transport', 'communicator'])
+#if quic_dep.found()
+# test('test_communicator_basic-quic', testcommunicator_basic_quic,
+# workdir: meson.current_build_dir(),
+# suite: ['transport', 'communicator'])
+#endif
+#test('test_communicator_rekey-tcp', testcommunicator_rekey_tcp,
+# workdir: meson.current_build_dir(),
+# suite: ['transport', 'communicator'])
+#test('test_communicator_rekey-udp', testcommunicator_rekey_udp,
+# workdir: meson.current_build_dir(),
+# suite: ['transport', 'communicator'])
+#test('test_communicator_backchannel-udp', testcommunicator_backchannel_udp,
+# workdir: meson.current_build_dir(),
+# suite: ['transport', 'communicator'])
+#test('test_communicator_bidirect-tcp', testcommunicator_bidirect_tcp,
+# workdir: meson.current_build_dir(),
+# suite: ['transport', 'communicator'])
diff --git a/src/service/transport/test_communicator_basic.c
b/src/service/transport/test_communicator_basic.c
index fdbad0957..52a4cf2c4 100644
--- a/src/service/transport/test_communicator_basic.c
+++ b/src/service/transport/test_communicator_basic.c
@@ -27,7 +27,6 @@
#include "platform.h"
#include "gnunet_util_lib.h"
#include "transport-testing-communicator.h"
-#include "gnunet_ats_transport_service.h"
#include "gnunet_signatures.h"
#include "gnunet_testing_lib.h"
#include "transport.h"
@@ -103,14 +102,14 @@ static unsigned int iterations_left[NUM_PEERS];
#define TIMEOUT_MULTIPLIER 1
-#define DELAY \
- GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS,200)
+#define DEFAULT_DELAY \
+ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS,200)
#define SHORT_BURST_WINDOW \
- GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,2)
+ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,2)
#define LONG_BURST_WINDOW \
- GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,2)
+ GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS,2)
enum TestPhase
{
@@ -374,7 +373,7 @@ process_statistics (void *cls,
int is_persistent)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Statistic: Name %s and value %lu\n",
+ "Statistic: Name %s and value %" PRIu64 "\n",
name,
value);
if ((0 == strcmp ("rekey", test_name)) && (0 == strcmp (
@@ -846,7 +845,8 @@ update_avg_latency (const char *payload, unsigned int
peer_nr)
+ latency.rel_value_us)
/ num_received;
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "Latency of received packet by peer %u: %s with avg latency %lu\n",
+ "Latency of received packet by peer %u: %s with avg latency %" PRIu64
+ "\n",
peer_nr,
GNUNET_STRINGS_relative_time_to_string (latency,
GNUNET_YES),
@@ -1191,7 +1191,7 @@ main (int argc,
TEST_SECTION,
"DELAY_SHORT",
&delay_short_value))
- delay_short = DELAY;
+ delay_short = DEFAULT_DELAY;
else
GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS,
delay_short_value);
@@ -1200,7 +1200,7 @@ main (int argc,
TEST_SECTION,
"DELAY_SHORT",
&delay_long_value))
- delay_long = DELAY;
+ delay_long = DEFAULT_DELAY;
else
GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS,
delay_long_value);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.