1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Unit tests must be done at integration process.

* Remove --enable-unittests and --disable-unittests and add --do-unittests function
* --do-unittests function will exit 0 on success.
* minetest and minetestserver binaries are launched with --do-unittests in travis build.
This commit is contained in:
Loic Blot 2015-02-19 09:38:01 +01:00
parent 38e6280552
commit b3aeba684b
4 changed files with 21 additions and 28 deletions

View file

@ -2132,9 +2132,9 @@ void run_tests()
TEST(TestCollision);
if(INTERNET_SIMULATOR == false){
TEST(TestSocket);
dout_con<<"=== BEGIN RUNNING UNIT TESTS FOR CONNECTION ==="<<std::endl;
dout_con << "=== BEGIN RUNNING UNIT TESTS FOR CONNECTION ===" << std::endl;
TEST(TestConnection);
dout_con<<"=== END RUNNING UNIT TESTS FOR CONNECTION ==="<<std::endl;
dout_con << "=== END RUNNING UNIT TESTS FOR CONNECTION ===" << std::endl;
}
log_set_lev_silence(LMT_ERROR, false);
@ -2142,13 +2142,13 @@ void run_tests()
delete idef;
delete ndef;
if(tests_failed == 0){
infostream<<"run_tests(): "<<tests_failed<<" / "<<tests_run<<" tests failed."<<std::endl;
infostream<<"run_tests() passed."<<std::endl;
if(tests_failed == 0) {
actionstream << "run_tests(): " << tests_failed << " / " << tests_run << " tests failed." << std::endl;
actionstream << "run_tests() passed." << std::endl;
return;
} else {
errorstream<<"run_tests(): "<<tests_failed<<" / "<<tests_run<<" tests failed."<<std::endl;
errorstream<<"run_tests() aborting."<<std::endl;
errorstream << "run_tests(): " << tests_failed << " / " << tests_run << " tests failed." << std::endl;
errorstream << "run_tests() aborting." << std::endl;
abort();
}
}