gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 08/40: TNG: Added generic start script for test cases.


From: gnunet
Subject: [gnunet] 08/40: TNG: Added generic start script for test cases.
Date: Thu, 05 Oct 2023 08:57:11 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit 80971b6327e1906bdfe2d3e9012f93c36bae47fa
Author: t3sserakt <t3ss@posteo.de>
AuthorDate: Fri Jul 14 19:10:52 2023 +0200

    TNG: Added generic start script for test cases.
---
 src/transport/Makefile.am                      | 22 +++++++++++++++++++++-
 src/transport/test_transport_start_testcase.sh | 12 ++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/src/transport/Makefile.am b/src/transport/Makefile.am
index eeafab840..93d6aed13 100644
--- a/src/transport/Makefile.am
+++ b/src/transport/Makefile.am
@@ -363,7 +363,25 @@ plugin_LTLIBRARIES = \
   libgnunet_test_transport_plugin_cmd_simple_send.la \
   libgnunet_test_transport_plugin_cmd_simple_send_broadcast.la \
   libgnunet_test_transport_plugin_cmd_simple_send_dv.la \
-  libgnunet_test_transport_plugin_cmd_udp_backchannel.la
+  libgnunet_test_transport_plugin_cmd_udp_backchannel.la \
+  libgnunet_test_transport_plugin_cmd_just_run.la
+
+libgnunet_test_transport_plugin_cmd_just_run_la_SOURCES = \
+ test_transport_plugin_cmd_just_run.c
+libgnunet_test_transport_plugin_cmd_just_run_la_LIBADD = \
+  libgnunettransporttesting2.la \
+  libgnunettransportapplication.la \
+  libgnunettransportcore.la \
+  $(top_builddir)/src/testing/libgnunettesting.la \
+  $(top_builddir)/src/peerstore/libgnunetpeerstore.la \
+  $(top_builddir)/src/statistics/libgnunetstatistics.la \
+  $(top_builddir)/src/hello/libgnunethello.la \
+  $(top_builddir)/src/ats/libgnunetats.la \
+  $(top_builddir)/src/arm/libgnunetarm.la \
+  $(top_builddir)/src/util/libgnunetutil.la \
+  $(LTLIBINTL)
+libgnunet_test_transport_plugin_cmd_just_run_la_LDFLAGS = \
+  $(GN_PLUGIN_LDFLAGS)
 
 libgnunet_test_transport_plugin_cmd_nat_upnp_la_SOURCES = \
  test_transport_plugin_cmd_nat_upnp.c
@@ -779,6 +797,7 @@ endif
 # Only test TNG if we run experimental
 if HAVE_EXPERIMENTAL
 check_SCRIPTS= \
+  test_transport_start_testcase.sh \
   test_transport_simple_send_performance.sh \
   test_transport_nat_icmp_tcp.sh \
   test_transport_nat_upnp.sh \
@@ -1530,6 +1549,7 @@ test_transport_api_slow_ats_LDADD = \
 
 
 EXTRA_DIST = \
+test_transport_start_testcase.sh \
 test_transport_simple_send_performance.sh \
 test_transport_nat_icmp_tcp.sh \
 test_transport_nat_upnp.sh \
diff --git a/src/transport/test_transport_start_testcase.sh 
b/src/transport/test_transport_start_testcase.sh
new file mode 100755
index 000000000..028c8f248
--- /dev/null
+++ b/src/transport/test_transport_start_testcase.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+read -p "Test case configuration to use:" conf
+if ! [ -d "/run/netns" ]; then
+    echo You have to create the directory /run/netns.
+fi
+if [ -f /proc/sys/kernel/unprivileged_userns_clone ]; then
+  if  [ "$(cat /proc/sys/kernel/unprivileged_userns_clone)" != 1 ]; then
+    echo -e "Error during test setup: The kernel parameter 
kernel.unprivileged_userns_clone has to be set to 1! One has to execute\n\n 
sysctl kernel.unprivileged_userns_clone=1\n"
+    exit 78
+  fi
+fi
+exec unshare -r -nmU bash -c "mount -t tmpfs --make-rshared tmpfs /run/netns; 
./test_transport_start_with_config $conf"

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]