neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35303?usp=email )
(
5 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: mgcp_test: fix false negatives in test output ......................................................................
mgcp_test: fix false negatives in test output
If one test fails, do not print failure for all following tests as well.
Change-Id: I196880b4b34a672ef45042c25f89bc1684363567 --- M tests/mgcp/mgcp_test.c 1 file changed, 17 insertions(+), 2 deletions(-)
Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c index 621ee77..c76bd9d 100644 --- a/tests/mgcp/mgcp_test.c +++ b/tests/mgcp/mgcp_test.c @@ -2137,7 +2137,7 @@ 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++) { @@ -2146,6 +2146,7 @@ int rc; int conn_i; int c; + bool ok = true;
printf("#%d: %s\n", i, t->descr);
@@ -2186,9 +2187,12 @@ 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)