From 53a450ed489902e4574767cdcc3e3eb073a689cb Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 29 Oct 2024 13:44:00 -0400 Subject: [PATCH] MT#61352 add config file test Change-Id: I42df2103693d97e1d4ec639d74e934fb82e1c6df --- t/Makefile | 7 ++- t/auto-daemon-tests-config-file.pl | 74 ++++++++++++++++++++++++++++++ t/test.conf | 7 +++ 3 files changed, 86 insertions(+), 2 deletions(-) create mode 100755 t/auto-daemon-tests-config-file.pl create mode 100644 t/test.conf diff --git a/t/Makefile b/t/Makefile index 39509fd43..ac95064ee 100644 --- a/t/Makefile +++ b/t/Makefile @@ -101,7 +101,7 @@ include ../lib/common.Makefile daemon-tests-main daemon-tests-jb daemon-tests-dtx daemon-tests-dtx-cn daemon-tests-pubsub \ daemon-tests-intfs daemon-tests-stats daemon-tests-delay-buffer daemon-tests-delay-timing \ daemon-tests-evs daemon-tests-player-cache daemon-tests-redis daemon-tests-redis-json \ - daemon-tests-measure-rtp daemon-tests-mos-legacy daemon-tests-mos-fullband + daemon-tests-measure-rtp daemon-tests-mos-legacy daemon-tests-mos-fullband daemon-tests-config-file TESTS= test-bitstr aes-crypt aead-aes-crypt test-const_str_hash.strhash ifeq ($(with_transcoding),yes) @@ -140,7 +140,7 @@ daemon-tests: daemon-tests-main daemon-tests-jb daemon-tests-pubsub daemon-tests daemon-tests-audio-player daemon-tests-audio-player-play-media \ daemon-tests-intfs daemon-tests-stats daemon-tests-player-cache daemon-tests-redis \ daemon-tests-rtpp-flags daemon-tests-redis-json daemon-tests-measure-rtp daemon-tests-mos-legacy \ - daemon-tests-mos-fullband + daemon-tests-mos-fullband daemon-tests-config-file daemon-test-deps: tests-preload.so $(MAKE) -C ../daemon @@ -208,6 +208,9 @@ daemon-tests-mos-legacy: daemon-test-deps daemon-tests-mos-fullband: daemon-test-deps ./auto-test-helper "$@" perl -I../perl auto-daemon-tests-mos-fullband.pl +daemon-tests-config-file: daemon-test-deps + ./auto-test-helper "$@" perl -I../perl auto-daemon-tests-config-file.pl + test-bitstr: test-bitstr.o test-mix-buffer: test-mix-buffer.o $(COMMONOBJS) mix_buffer.o ssrc.o rtp.o crypto.o helpers.o \ diff --git a/t/auto-daemon-tests-config-file.pl b/t/auto-daemon-tests-config-file.pl new file mode 100755 index 000000000..e4ffec257 --- /dev/null +++ b/t/auto-daemon-tests-config-file.pl @@ -0,0 +1,74 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use NGCP::Rtpengine::Test; +use NGCP::Rtpclient::SRTP; +use NGCP::Rtpengine::AutoTest; +use Test::More; +use Test2::Tools::Compare qw(); +use NGCP::Rtpclient::ICE; +use POSIX; + + +autotest_start(qw(--config-file=test.conf)) or die; + + + + +my ($sock_a, $sock_b, $sock_c, $sock_d, $port_a, $port_b, $ssrc, $ssrc_b, $resp, + $sock_ax, $sock_bx, $port_ax, $port_bx, + $srtp_ctx_a, $srtp_ctx_b, $srtp_ctx_a_rev, $srtp_ctx_b_rev, $ufrag_a, $ufrag_b, + @ret1, @ret2, @ret3, @ret4, $srtp_key_a, $srtp_key_b, $ts, $seq, $has_recv); + + + +new_call; + +offer('basic call', { }, < 'foobar' }, <