test/lwip clients: exit with error code

Issue #2751
This commit is contained in:
Martin Stein 2018-04-12 12:05:22 +02:00 committed by Christian Helmuth
parent 6ec8824d75
commit 375a7c701a
2 changed files with 4 additions and 1 deletions

View File

@ -122,7 +122,7 @@ void Libc::Component::construct(Libc::Env &env)
;
if (++success_cnt >= 5) {
log("Test done");
return;
env.parent().exit(0);
}
} else
break;
@ -132,4 +132,5 @@ void Libc::Component::construct(Libc::Env &env)
lwip_close(s);
}
log("Test failed");
env.parent().exit(-1);
}

View File

@ -78,8 +78,10 @@ void Libc::Component::construct(Libc::Env &env)
log("Received \"", String<64>(buf), " ...\"");
if (++success_cnt >= 5) {
log("Test done");
env.parent().exit(0);
return;
}
}
log("Test failed");
env.parent().exit(-1);
}