summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2021-07-26 16:57:07 +1000
committerMaxime Coste <mawww@kakoune.org>2021-07-26 16:57:07 +1000
commitcf5237942231e7132db17cdc6fe5bd82a52fa71f (patch)
tree0952d4cf3cdb621c84ba7c963494c1693f8f0def /src
parentcbba348a835ef0e636d6e2015b4ef0d11bc476a4 (diff)
Do not run unit tests in release builds
They mostly rely on assertions that are disabled in those builds anyway.
Diffstat (limited to 'src')
-rw-r--r--src/main.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.cc b/src/main.cc
index 2a50b72d..fb0b165b 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -769,6 +769,7 @@ int run_server(StringView session, StringView server_init,
write_to_debug_buffer("*** This is the debug buffer, where debug info will be written ***");
+#ifdef KAK_DEBUG
const auto start_time = Clock::now();
UnitTest::run_all_tests();
@@ -778,6 +779,7 @@ int run_server(StringView session, StringView server_init,
write_to_debug_buffer(format("running the unit tests took {} ms",
duration_cast<milliseconds>(Clock::now() - start_time).count()));
}
+#endif
GlobalScope::instance().options().get_local_option("readonly").set<bool>(flags & ServerFlags::ReadOnly);