diff options
author | Wolfgang Bauer <wbauer@tmo.at> | 2017-07-31 13:55:18 +0200 |
---|---|---|
committer | Wolfgang Bauer <wbauer@tmo.at> | 2017-07-31 13:55:18 +0200 |
commit | 899519f0be03360e2fa4f995c44cefc693805418 (patch) | |
tree | 7aac685eafeae46046654667fcf95658202c08bd | |
parent | 03fc1de44ef988112f65412728cfe81a3658a1be (diff) | |
download | extra-cmake-modules-899519f0be03360e2fa4f995c44cefc693805418.tar.gz extra-cmake-modules-899519f0be03360e2fa4f995c44cefc693805418.tar.bz2 |
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
-rw-r--r-- | tests/ECMPoQmToolsTest/check.cmake.in | 2 |
1 files changed, 1 insertions, 1 deletions
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() |