summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2020-01-31 16:31:48 +0000
committerOlivier Crête <olivier.crete@collabora.com>2020-05-22 17:04:39 -0400
commit1e4272b436ad1de4c473318399ac5185c92dfc55 (patch)
treeea82e5de9acb1ca2444ab5fc1981122f7dbc45af /tests
parent7581462a40e4e28d73d8e575336969a2f16a11b5 (diff)
downloadlibnice-1e4272b436ad1de4c473318399ac5185c92dfc55.tar.gz
Remove autotools build
Remove dist check on the CI, since it doesn't really add anything in the Meson case (tarball is based on files checked into git and srcdir != builddir).
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am152
-rwxr-xr-xtests/check-test-fullmode-with-stun.sh36
-rw-r--r--tests/docker/centos7-autotools/Dockerfile21
-rw-r--r--tests/meson.build11
-rwxr-xr-xtests/test-pseudotcp-random.sh6
5 files changed, 4 insertions, 222 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
deleted file mode 100644
index 473e5e0..0000000
--- a/tests/Makefile.am
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-# Makefile.am for the Nice Glib ICE library
-#
-# (C) 2006, 2007 Collabora Ltd.
-# (C) 2006, 2007 Nokia Corporation. All rights reserved.
-#
-# Licensed under MPL 1.1/LGPL 2.1. See file COPYING.
-
-include $(top_srcdir)/common.mk
-
-AM_CFLAGS = \
- $(LIBNICE_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(GUPNP_CFLAGS) \
- -I $(top_srcdir) \
- -I $(top_srcdir)/agent \
- -I $(top_srcdir)/random \
- -I $(top_srcdir)/socket \
- -I $(top_srcdir)/stun
-AM_CPPFLAGS = -DG_LOG_DOMAIN=\"libnice-tests\"
-
-AM_TESTS_ENVIRONMENT = \
- G_MESSAGES_DEBUG=all \
- NICE_DEBUG=all \
- GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:$(top_builddir)/gst
-
-COMMON_LDADD = $(top_builddir)/agent/libagent.la $(top_builddir)/socket/libsocket.la $(GLIB_LIBS) $(GUPNP_LIBS)
-
-check_PROGRAMS = \
- test-pseudotcp \
- test-pseudotcp-fin \
- test-pseudotcp-fuzzy \
- test-bsd \
- test \
- test-address \
- test-add-remove-stream \
- test-build-io-stream \
- test-io-stream-thread \
- test-io-stream-closing-write \
- test-io-stream-closing-read \
- test-io-stream-cancelling \
- test-io-stream-pollable \
- test-send-recv \
- test-socket-is-based-on \
- test-udp-turn-fragmentation \
- test-priority \
- test-fullmode \
- test-different-number-streams \
- test-restart \
- test-fallback \
- test-thread \
- test-trickle \
- test-new-trickle \
- test-tcp \
- test-icetcp \
- test-credentials \
- test-turn \
- test-drop-invalid \
- test-nomination \
- test-interfaces
-
-dist_check_SCRIPTS = \
- check-test-fullmode-with-stun.sh \
- test-pseudotcp-random.sh
-
-if HAVE_GST_CHECK
-check_PROGRAMS += test-gstreamer
-endif
-
-TESTS = $(check_PROGRAMS) $(dist_check_SCRIPTS)
-
-noinst_HEADERS = test-io-stream-common.h
-
-test_pseudotcp_LDADD = $(COMMON_LDADD)
-
-test_pseudotcp_fin_LDADD = $(COMMON_LDADD)
-
-test_pseudotcp_fuzzy_LDADD = $(COMMON_LDADD) -lm
-
-test_bsd_LDADD = $(COMMON_LDADD)
-
-test_LDADD = $(COMMON_LDADD)
-
-test_thread_LDADD = $(COMMON_LDADD)
-
-test_address_LDADD = $(COMMON_LDADD)
-
-test_add_remove_stream_LDADD = $(COMMON_LDADD)
-
-test_build_io_stream_LDADD = $(COMMON_LDADD)
-
-test_io_stream_thread_SOURCES = test-io-stream-thread.c test-io-stream-common.c
-test_io_stream_thread_LDADD = $(COMMON_LDADD)
-
-test_io_stream_closing_write_SOURCES = test-io-stream-closing-write.c test-io-stream-common.c
-test_io_stream_closing_write_LDADD = $(COMMON_LDADD)
-
-test_io_stream_closing_read_SOURCES = test-io-stream-closing-read.c test-io-stream-common.c
-test_io_stream_closing_read_LDADD = $(COMMON_LDADD)
-
-test_io_stream_cancelling_SOURCES = test-io-stream-cancelling.c test-io-stream-common.c
-test_io_stream_cancelling_LDADD = $(COMMON_LDADD)
-
-test_io_stream_pollable_SOURCES = test-io-stream-pollable.c test-io-stream-common.c
-test_io_stream_pollable_LDADD = $(COMMON_LDADD)
-
-test_send_recv_SOURCES = test-send-recv.c test-io-stream-common.c
-test_send_recv_LDADD = $(COMMON_LDADD)
-
-test_socket_is_based_on_LDADD = $(COMMON_LDADD)
-
-test_udp_turn_fragmentation_LDADD = $(COMMON_LDADD)
-
-test_priority_LDADD = $(COMMON_LDADD)
-
-test_fullmode_LDADD = $(COMMON_LDADD)
-
-test_different_number_streams_LDADD = $(COMMON_LDADD)
-
-test_restart_LDADD = $(COMMON_LDADD)
-
-test_fallback_LDADD = $(COMMON_LDADD)
-
-test_trickle_LDADD = $(COMMON_LDADD)
-
-test_new_trickle_LDADD = $(COMMON_LDADD)
-
-test_tcp_LDADD = $(COMMON_LDADD)
-
-test_icetcp_LDADD = $(COMMON_LDADD)
-
-test_credentials_LDADD = $(COMMON_LDADD)
-
-test_turn_LDADD = $(COMMON_LDADD)
-
-test_drop_invalid_LDADD = $(COMMON_LDADD)
-
-test_nomination_LDADD = $(COMMON_LDADD)
-
-test_gstreamer_CFLAGS = $(AM_CFLAGS) $(GST_CHECK_CFLAGS)
-test_gstreamer_LDADD = -lnice -L$(top_builddir)/nice/.libs $(GLIB_LIBS) $(GUPNP_LIBS) $(GST_CHECK_LIBS) $(GST_LIBS)
-
-test_interfaces_LDADD = $(COMMON_LDADD)
-
-all-local:
- chmod a+x $(srcdir)/check-test-fullmode-with-stun.sh
- chmod a+x $(srcdir)/test-pseudotcp-random.sh
-
-EXTRA_DIST = \
- libnice.supp \
- meson.build \
- test-fullmode-with-stun.c
diff --git a/tests/check-test-fullmode-with-stun.sh b/tests/check-test-fullmode-with-stun.sh
deleted file mode 100755
index 7be4190..0000000
--- a/tests/check-test-fullmode-with-stun.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#! /bin/sh
-
-if test -n "${BUILT_WITH_MESON}"; then
- STUND=$1
- TEST_FULLMODE=$2
-else
- STUND=../stun/tools/stund
- TEST_FULLMODE=./test-fullmode
-fi
-
-echo "Starting ICE full-mode with STUN unit test."
-
-[ -e "$STUND" ] || {
- echo "STUN server not found: Cannot run unit test!" >&2
- exit 77
-}
-
-set -x
-pidfile=./stund.pid
-
-export NICE_STUN_SERVER=127.0.0.1
-export NICE_STUN_SERVER_PORT=3800
-
-echo "Launching $STUND on port ${NICE_STUN_SERVER_PORT}."
-
-rm -f -- "$pidfile"
-(sh -c "echo \$\$ > \"$pidfile\" && exec "$STUND" ${NICE_STUN_SERVER_PORT}") &
-sleep 1
-
-"${TEST_FULLMODE}"
-error=$?
-
-kill "$(cat "$pidfile")"
-rm -f -- "$pidfile"
-wait
-exit ${error}
diff --git a/tests/docker/centos7-autotools/Dockerfile b/tests/docker/centos7-autotools/Dockerfile
deleted file mode 100644
index 10fbf5e..0000000
--- a/tests/docker/centos7-autotools/Dockerfile
+++ /dev/null
@@ -1,21 +0,0 @@
-# build with
-# docker build -t registry.freedesktop.org/libnice/libnice/centos7/autotools-build:$(date --rfc-3339=date) .
-# docker tag registry.freedesktop.org/libnice/libnice/centos7/autotools-build:$(date --rfc-3339=date) registry.freedesktop.org/libnice/libnice/centos7/autotools-build:latest
-# docker push registry.freedesktop.org/libnice/libnice/centos7/autotools-build:$(date --rfc-3339=date)
-# docker push registry.freedesktop.org/libnice/libnice/centos7/autotools-build:latest
-
-# alternatively
-
-# export BUILDAH_FORMAT=docker
-# buildah bud -t registry.freedesktop.org/libnice/libnice/centos7/autotools-build:$(date --rfc-3339=date) .
-# buildah tag registry.freedesktop.org/libnice/libnice/centos7/autotools-build:$(date --rfc-3339=date) registry.freedesktop.org/libnice/libnice/centos7/autotools-build:latest
-# buildah push registry.freedesktop.org/libnice/libnice/centos7/autotools-build:latest
-# buildah push registry.freedesktop.org/libnice/libnice/centos7/autotools-build:$(date --rfc-3339=date)
-
-FROM centos:centos7
-
-RUN yum -y update; yum clean all
-RUN yum -y install git gtk-doc gnutls-devel gupnp-igd-devel gstreamer1-devel gobject-introspection-devel valgrind; yum clean all
-
-RUN yum -y install autoconf automake libtool; yum clean all
-RUN yum -y install net-tools; yum clean all
diff --git a/tests/meson.build b/tests/meson.build
index e238a92..b6d5a03 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -37,9 +37,6 @@ if cc.has_header('arpa/inet.h')
]
endif
-tenv = environment()
-tenv.set('BUILT_WITH_MESON', '1')
-
foreach tname : nice_tests
if tname.startswith('test-io-stream') or tname.startswith('test-send-recv')
extra_src = ['test-io-stream-common.c']
@@ -54,7 +51,7 @@ foreach tname : nice_tests
link_with: [libagent, libstun, libsocket, librandom],
install: false)
set_variable(tname.underscorify(), exe)
- test(tname, exe, env: tenv)
+ test(tname, exe)
if tname == 'test-fullmode'
wrapper_exe = executable ('nice-test-fullmode-with-stun',
@@ -63,7 +60,6 @@ foreach tname : nice_tests
install: false)
test('test-fullmode-with-stun', wrapper_exe,
args: [stund_exe, test_fullmode],
- env: tenv,
is_parallel: false,
depends: exe)
endif
@@ -80,7 +76,7 @@ if gst_dep.found()
dependencies: [nice_deps, gst_check, libm],
link_with: libnice,
install: false)
- gst_env = tenv
+ gst_env = environment()
gst_env.append('GST_PLUGIN_PATH_1_0', join_paths(meson.current_build_dir(), '..', 'gst'))
test('test-gstreamer', exe, env: gst_env)
endif
@@ -88,8 +84,7 @@ endif
if find_program('sh', required : false).found() and find_program('dd', required : false).found() and find_program('diff', required : false).found()
test('test-pseudotcp-random', find_program('test-pseudotcp-random.sh'),
- args: test_pseudotcp,
- env: tenv)
+ args: test_pseudotcp)
endif
debugenv = environment()
diff --git a/tests/test-pseudotcp-random.sh b/tests/test-pseudotcp-random.sh
index f98d12e..cb7219d 100755
--- a/tests/test-pseudotcp-random.sh
+++ b/tests/test-pseudotcp-random.sh
@@ -2,11 +2,7 @@
set -e
-if test -n "${BUILT_WITH_MESON}"; then
- TEST_PSEUDOTCP=$1
-else
- TEST_PSEUDOTCP=./test-pseudotcp
-fi
+TEST_PSEUDOTCP="$1"
cleanup() {
rm -rf rand rand-copy