neels submitted this change.

View Change



5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified
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(-)

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)

To view, visit change 35303. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I196880b4b34a672ef45042c25f89bc1684363567
Gerrit-Change-Number: 35303
Gerrit-PatchSet: 6
Gerrit-Owner: neels <nhofmeyr@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged