From c7a9dc76dce09d4f23260d26c629a91ef02514a0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marcin=20=C5=9Alusarz?= Date: Thu, 30 Jul 2020 16:18:37 +0200 Subject: [PATCH] intel/compiler/test: use TEST_DEBUG env var consistently MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Other tests use the same environment variable to decide whether they should print debugging information. Will quiet Coverity's "'Constant' variable guards dead code". Signed-off-by: Marcin Ślusarz Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/test_vec4_copy_propagation.cpp | 2 +- src/intel/compiler/test_vec4_dead_code_eliminate.cpp | 2 +- src/intel/compiler/test_vec4_register_coalesce.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/intel/compiler/test_vec4_copy_propagation.cpp b/src/intel/compiler/test_vec4_copy_propagation.cpp index 5f3f3e525f2..238f04d2657 100644 --- a/src/intel/compiler/test_vec4_copy_propagation.cpp +++ b/src/intel/compiler/test_vec4_copy_propagation.cpp @@ -105,7 +105,7 @@ void copy_propagation_test::SetUp() static void copy_propagation(vec4_visitor *v) { - bool print = false; + const bool print = getenv("TEST_DEBUG"); if (print) { fprintf(stderr, "instructions before:\n"); diff --git a/src/intel/compiler/test_vec4_dead_code_eliminate.cpp b/src/intel/compiler/test_vec4_dead_code_eliminate.cpp index 25739c2895a..9bf787f0666 100644 --- a/src/intel/compiler/test_vec4_dead_code_eliminate.cpp +++ b/src/intel/compiler/test_vec4_dead_code_eliminate.cpp @@ -103,7 +103,7 @@ void dead_code_eliminate_test::SetUp() static void dead_code_eliminate(vec4_visitor *v) { - bool print = false; + const bool print = getenv("TEST_DEBUG"); if (print) { fprintf(stderr, "instructions before:\n"); diff --git a/src/intel/compiler/test_vec4_register_coalesce.cpp b/src/intel/compiler/test_vec4_register_coalesce.cpp index 9636db2aca6..4621fd64ec6 100644 --- a/src/intel/compiler/test_vec4_register_coalesce.cpp +++ b/src/intel/compiler/test_vec4_register_coalesce.cpp @@ -108,7 +108,7 @@ void register_coalesce_test::SetUp() static void _register_coalesce(vec4_visitor *v, const char *func) { - bool print = false; + const bool print = getenv("TEST_DEBUG"); if (print) { printf("%s: instructions before:\n", func); -- 2.30.2