diff --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt
--- a/mlir/test/CMakeLists.txt
+++ b/mlir/test/CMakeLists.txt
@@ -10,6 +10,7 @@
   MLIR_ENABLE_ROCM_RUNNER
   MLIR_ENABLE_SPIRV_CPU_RUNNER
   MLIR_ENABLE_VULKAN_RUNNER
+  MLIR_INCLUDE_INTEGRATION_TESTS
   )
 
 # Passed to lit.site.cfg.py.so that the out of tree Standalone dialect test
@@ -36,6 +37,12 @@
   # Passed to lit.site.cfg.py.in to set up the path where to find the libraries.
   set(MLIR_INTEGRATION_TEST_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
 
+  llvm_canonicalize_cmake_booleans(
+    MLIR_RUN_AMX_TESTS
+    MLIR_RUN_X86VECTOR_TESTS
+    MLIR_RUN_CUDA_TENSOR_CORE_TESTS
+    )
+
   # Copy test data over.
   file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/Integration/data/mttkrp_b.tns
             ${CMAKE_CURRENT_SOURCE_DIR}/Integration/data/test.mtx
diff --git a/mlir/test/Integration/Dialect/Vector/CPU/AMX/lit.local.cfg b/mlir/test/Integration/Dialect/Vector/CPU/AMX/lit.local.cfg
--- a/mlir/test/Integration/Dialect/Vector/CPU/AMX/lit.local.cfg
+++ b/mlir/test/Integration/Dialect/Vector/CPU/AMX/lit.local.cfg
@@ -1,7 +1,7 @@
 import sys
 
 # AMX tests must be enabled via build flag.
-if config.mlir_run_amx_tests != 'ON':
+if not config.mlir_run_amx_tests:
     config.unsupported = True
 
 # No JIT on win32.
diff --git a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/lit.local.cfg b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/lit.local.cfg
--- a/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/lit.local.cfg
+++ b/mlir/test/Integration/Dialect/Vector/CPU/X86Vector/lit.local.cfg
@@ -1,7 +1,7 @@
 import sys
 
 # X86Vector tests must be enabled via build flag.
-if config.mlir_run_x86vector_tests != 'ON':
+if not config.mlir_run_x86vector_tests:
     config.unsupported = True
 
 # No JIT on win32.
diff --git a/mlir/test/Integration/GPU/CUDA/TensorCore/lit.local.cfg b/mlir/test/Integration/GPU/CUDA/TensorCore/lit.local.cfg
--- a/mlir/test/Integration/GPU/CUDA/TensorCore/lit.local.cfg
+++ b/mlir/test/Integration/GPU/CUDA/TensorCore/lit.local.cfg
@@ -1,5 +1,5 @@
 import sys
 
 # TensorCore tests must be enabled via build flag.
-if config.mlir_run_cuda_tensor_core_tests != 'ON':
+if not config.mlir_run_cuda_tensor_core_tests:
   config.unsupported = True
diff --git a/mlir/test/Integration/lit.local.cfg b/mlir/test/Integration/lit.local.cfg
--- a/mlir/test/Integration/lit.local.cfg
+++ b/mlir/test/Integration/lit.local.cfg
@@ -1,2 +1,2 @@
-if config.mlir_include_integration_tests != 'ON':
+if not config.mlir_include_integration_tests:
     config.unsupported = True
diff --git a/mlir/test/lit.site.cfg.py.in b/mlir/test/lit.site.cfg.py.in
--- a/mlir/test/lit.site.cfg.py.in
+++ b/mlir/test/lit.site.cfg.py.in
@@ -48,10 +48,10 @@
 config.enable_bindings_python = @MLIR_ENABLE_BINDINGS_PYTHON@
 config.mlir_integration_test_dir = "@MLIR_INTEGRATION_TEST_DIR@"
 config.intel_sde_executable = "@INTEL_SDE_EXECUTABLE@"
-config.mlir_run_amx_tests = "@MLIR_RUN_AMX_TESTS@"
-config.mlir_run_x86vector_tests = "@MLIR_RUN_X86VECTOR_TESTS@"
-config.mlir_run_cuda_tensor_core_tests = "@MLIR_RUN_CUDA_TENSOR_CORE_TESTS@"
-config.mlir_include_integration_tests = "@MLIR_INCLUDE_INTEGRATION_TESTS@"
+config.mlir_run_amx_tests = @MLIR_RUN_AMX_TESTS@
+config.mlir_run_x86vector_tests = @MLIR_RUN_X86VECTOR_TESTS@
+config.mlir_run_cuda_tensor_core_tests = @MLIR_RUN_CUDA_TENSOR_CORE_TESTS@
+config.mlir_include_integration_tests = @MLIR_INCLUDE_INTEGRATION_TESTS@
 
 # Support substitution of the tools_dir with user parameters. This is
 # used when we can't determine the tool dir at configuration time.
diff --git a/mlir/test/python/integration/lit.local.cfg b/mlir/test/python/integration/lit.local.cfg
--- a/mlir/test/python/integration/lit.local.cfg
+++ b/mlir/test/python/integration/lit.local.cfg
@@ -1,2 +1,2 @@
-if config.mlir_include_integration_tests != 'ON':
+if not config.mlir_include_integration_tests:
     config.unsupported = True