From cf5237942231e7132db17cdc6fe5bd82a52fa71f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 26 Jul 2021 16:57:07 +1000 Subject: [PATCH] Do not run unit tests in release builds They mostly rely on assertions that are disabled in those builds anyway. --- src/main.cc | 2 ++ 1 file changed, 2 insertions(+) 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(Clock::now() - start_time).count())); } +#endif GlobalScope::instance().options().get_local_option("readonly").set(flags & ServerFlags::ReadOnly);