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:
parent
38e6280552
commit
b3aeba684b
4 changed files with 21 additions and 28 deletions
14
src/test.cpp
14
src/test.cpp
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue