From 899519f0be03360e2fa4f995c44cefc693805418 Mon Sep 17 00:00:00 2001 From: Wolfgang Bauer Date: Mon, 31 Jul 2017 13:55:18 +0200 Subject: Make ECMPoQmToolsTest actually fail if a translation is wrong Currently the test still passed even if one of the check_translations() calls would fail. The reason is that check_translations() is a function which has its own scope, so if it sets "failed" the upper level doesn't see it. Use the PARENT_SCOPE option when setting the variable to properly propagate the value to the upper level. Differential Revision: https://phabricator.kde.org/D6701 --- tests/ECMPoQmToolsTest/check.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ECMPoQmToolsTest/check.cmake.in b/tests/ECMPoQmToolsTest/check.cmake.in index 4fe2ac33..aeef8e42 100644 --- a/tests/ECMPoQmToolsTest/check.cmake.in +++ b/tests/ECMPoQmToolsTest/check.cmake.in @@ -76,7 +76,7 @@ if("@CMAKE_SYSTEM_NAME@" STREQUAL "Linux") string(STRIP "${output}" stripped_output) if(NOT stripped_output STREQUAL exp_output_${catalog_name}_${lang}) message(WARNING "${name}[${lang}] output was \"${stripped_output}\", but expected \"${exp_output_${catalog_name}_${lang}}\"") - set(fail ON) + set(fail ON PARENT_SCOPE) else() message(STATUS "${name}[${lang}] output was \"${stripped_output}\", as expected") endif() -- cgit v1.2.1