diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2023-12-10 07:12:39 +0100 |
---|---|---|
committer | Keith Whyte <keith@rhizomatica.org> | 2024-04-04 19:34:50 +0100 |
commit | 78a93c3710ff2b8711b0bd8422a2c400857208b2 (patch) | |
tree | 7a552b8b3ce99a632d227c68f7202bf22d2b6d19 | |
parent | 9c0a947d69e4207d23e2403a22728c5a95a2ef97 (diff) |
mgcp_test: fix false negatives in test outputrhizomatica/production
If one test fails, do not print failure for all following tests as well.
Change-Id: I196880b4b34a672ef45042c25f89bc1684363567
-rw-r--r-- | tests/mgcp/mgcp_test.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index e37bb57ca..7e213a13d 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -2144,7 +2144,7 @@ static bool codec_decision(struct mgcp_conn_rtp *conn, unsigned int index_conn_s static void test_mgcp_codec_decide(void) { int i; - bool ok = true; + bool ok_all = true; printf("\nTesting mgcp_codec_find_convertible()\n"); for (i = 0; i < ARRAY_SIZE(test_mgcp_codec_find_convertible_cases); i++) { @@ -2153,6 +2153,7 @@ static void test_mgcp_codec_decide(void) int rc; int conn_i; int c; + bool ok = true; printf("#%d: %s\n", i, t->descr); @@ -2193,9 +2194,12 @@ static void test_mgcp_codec_decide(void) printf(" ===> SUCCESS: codec decision as expected!\n"); else printf(" ===> FAIL: unexpected codec decision!\n"); + + if (!ok) + ok_all = false; } - OSMO_ASSERT(ok); + OSMO_ASSERT(ok_all); } void test_conn_id_matching(void) |