Browse Source

disable all AMR tests by default due to inconsistent codec libs

closes #708

Change-Id: I48f8c229486dc52c227e64782b05f931f1012c66
changes/28/27228/5
Richard Fuchs 7 years ago
parent
commit
490d7eb019
2 changed files with 17 additions and 2 deletions
  1. +11
    -2
      t/Makefile
  2. +6
    -0
      t/transcode-test.c

+ 11
- 2
t/Makefile View File

@ -23,6 +23,9 @@ CFLAGS+= $(shell pkg-config --cflags libevent_pthreads)
CFLAGS+= $(shell pkg-config xmlrpc_client --cflags 2> /dev/null || xmlrpc-c-config client --cflags)
CFLAGS+= $(shell pkg-config xmlrpc --cflags 2> /dev/null)
CFLAGS+= $(shell pkg-config xmlrpc_util --cflags 2> /dev/null)
ifeq ($(with_amr_tests),yes)
CFLAGS+= -DWITH_AMR_TESTS
endif
else
CFLAGS+= -DWITHOUT_CODECLIB
endif
@ -55,7 +58,10 @@ DAEMONSRCS= crypto.c ssrc.c aux.c rtp.c
HASHSRCS=
ifeq ($(with_transcoding),yes)
SRCS+= amr-decode-test.c amr-encode-test.c transcode-test.c
SRCS+= transcode-test.c
ifeq ($(with_amr_tests),yes)
SRCS+= amr-decode-test.c amr-encode-test.c
endif
LIBSRCS+= codeclib.c resample.c
DAEMONSRCS+= codec.c call.c ice.c kernel.c media_socket.c stun.c bencode.c socket.c poller.c \
dtls.c recording.c statistics.c rtcp.c redis.c iptables.c graphite.c \
@ -75,7 +81,10 @@ include .depend
TESTS= bitstr-test aes-crypt payload-tracker-test const_str_hash-test.strhash
ifeq ($(with_transcoding),yes)
TESTS+= amr-decode-test amr-encode-test transcode-test
TESTS+= transcode-test
ifeq ($(with_amr_tests),yes)
TESTS+= amr-decode-test amr-encode-test
endif
endif
ADD_CLEAN= tests-preload.so $(TESTS)


+ 6
- 0
t/transcode-test.c View File

@ -72,6 +72,7 @@ static void __start(const char *file, int line) {
#define transcode(codec) g_queue_push_tail(&flags.codec_transcode, sdup(#codec))
#ifdef WITH_AMR_TESTS
static void codec_set(char *c) {
// from call_ng_flags_str_ht_split
c = strdup(c);
@ -87,6 +88,7 @@ static void codec_set(char *c) {
splitter.len = c - splitter.s;
}
}
#endif
#define sdp_pt_fmt(num, codec, clockrate, fmt) \
__sdp_pt_fmt(num, (str) STR_CONST_INIT(#codec), clockrate, (str) STR_CONST_INIT(#codec "/" #clockrate), \
@ -132,6 +134,7 @@ static void __expect(const char *file, int line, GQueue *dumper, const char *cod
g_string_free(s, TRUE);
}
#ifdef WITH_AMR_TESTS
#define check_encoder(side, in_pt, out_pt, out_bitrate) \
__check_encoder(__FILE__, __LINE__, media_ ## side, in_pt, out_pt, out_bitrate)
@ -149,6 +152,7 @@ static void __check_encoder(const char *file, int line, struct call_media *m, in
}
printf("test ok: %s:%i\n", file, line);
}
#endif
#define packet_seq_ts(side, pt_in, pload, rtp_ts, rtp_seq, pt_out, pload_exp, ts_exp, fatal) \
__packet_seq_ts( __FILE__, __LINE__, media_ ## side, pt_in, (str) STR_CONST_INIT(pload), \
@ -490,6 +494,7 @@ int main() {
packet(B, 0, PCMU_payload, 0, PCMU_payload);
end();
#ifdef WITH_AMR_TESTS
{
str codec_name = STR_CONST_INIT("AMR-WB");
const codec_def_t *def = codec_find(&codec_name, MT_AUDIO);
@ -682,6 +687,7 @@ int main() {
end();
}
}
#endif
// G.722 <> PCMA
start();


Loading…
Cancel
Save