From 3c5089f7d0f72432e462bbc7d692755c49a36e3d Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Tue, 20 Dec 2022 15:06:32 -0500
Subject: [PATCH] Allow disabling tests via env var

---
 indra/cmake/Variables.cmake | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index d1cdc618c79..20bb186fa15 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -31,6 +31,12 @@ set(VIEWER_PREFIX)
 set(INTEGRATION_TESTS_PREFIX)
 
 option(LL_TESTS "Build and run unit and integration tests (disable for build timing runs to reduce variation" ON)
+if(DEFINED ENV{LL_TESTS})
+  set(LL_TESTS $ENV{LL_TESTS} CACHE STRING "Build and run unit and integration tests (disable for build timing runs to reduce variation" FORCE)
+else()
+  set(LL_TESTS "" CACHE STRING "Build and run unit and integration tests (disable for build timing runs to reduce variation")
+endif()
+
 option(ENABLE_MEDIA_PLUGINS "Turn off building media plugins if they are imported by third-party library mechanism" ON)
 
 # Compiler and toolchain options
@@ -53,9 +59,6 @@ option(USE_VLC "Enable VLC media plugin" ON)
 
 #Discord Integration
 option(USE_DISCORD "Enable Discord client integration" OFF)
-if (DEFINED ENV{USE_DISCORD})
-  set(USE_DISCORD $ENV{USE_DISCORD} CACHE BOOL "" FORCE)
-endif()
 
 if(DEFINED ENV{DISCORD_CLIENTID})
   set(DISCORD_CLIENTID $ENV{DISCORD_CLIENTID} CACHE STRING "Discord Client ID" FORCE)
@@ -73,11 +76,12 @@ if (INSTALL_PROPRIETARY)
   endif ()
 endif ()
 
+if (DEFINED ENV{USE_DISCORD})
+  set(USE_DISCORD $ENV{USE_DISCORD} CACHE BOOL "" FORCE)
+endif()
+
 #Crash reporting
 option(USE_SENTRY "Use the Sentry crash reporting system" OFF)
-if (DEFINED ENV{USE_SENTRY})
-  set(USE_SENTRY $ENV{USE_SENTRY} CACHE BOOL "" FORCE)
-endif()
 
 if(DEFINED ENV{SENTRY_DSN})
   set(SENTRY_DSN $ENV{SENTRY_DSN} CACHE STRING "Sentry DSN" FORCE)
@@ -94,6 +98,10 @@ else ()
   set(USE_SENTRY OFF CACHE BOOL "Use the Sentry crash reporting system" FORCE)
 endif ()
 
+if (DEFINED ENV{USE_SENTRY})
+  set(USE_SENTRY $ENV{USE_SENTRY} CACHE BOOL "" FORCE)
+endif()
+
 if(LIBS_CLOSED_DIR)
   file(TO_CMAKE_PATH "${LIBS_CLOSED_DIR}" LIBS_CLOSED_DIR)
 else(LIBS_CLOSED_DIR)
-- 
GitLab