diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2020-04-16 20:43:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-16 20:43:49 +0200 |
commit | 7539267d370ae9a1b547008a937bd7f57bece541 (patch) | |
tree | f4a04951d7d6e5a4000e0c9bd606e457679e0374 /src/main.cpp | |
parent | 093e79ea78c872293386bf10b76416ff284ac5b6 (diff) | |
download | minetest-7539267d370ae9a1b547008a937bd7f57bece541.tar.gz minetest-7539267d370ae9a1b547008a937bd7f57bece541.tar.bz2 minetest-7539267d370ae9a1b547008a937bd7f57bece541.zip |
Add an option to disable unittest build, & disable them on Docker build (#9677)
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index db020661a..82666e463 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -187,7 +187,13 @@ int main(int argc, char *argv[]) #ifndef __ANDROID__ // Run unit tests if (cmd_args.getFlag("run-unittests")) { +#if BUILD_UNITTESTS return run_tests(); +#else + errorstream << "Unittest support is not enabled in this binary. " + << "If you want to enable it, compile project with BUILD_UNITTESTS=1 flag." + << std::endl; +#endif } #endif |