diff options
author | Peter Levine <plevine457@gmail.com> | 2019-08-25 19:26:04 -0400 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2019-10-13 13:40:23 +0200 |
commit | 4813cf4d608daced07623cdcd783fdc7b0a82186 (patch) | |
tree | 95d46822d6faa49f00c56206f65bf8c6eb792544 /app-office | |
parent | app-office/gnucash: Don't build gtest from source (diff) | |
download | gentoo-4813cf4d608daced07623cdcd783fdc7b0a82186.tar.gz gentoo-4813cf4d608daced07623cdcd783fdc7b0a82186.tar.bz2 gentoo-4813cf4d608daced07623cdcd783fdc7b0a82186.zip |
app-office/gnucash: Fix testcase failures
test-qof and test-gnc-numeric both depend on the existence of
en_US, en_GB, and fr_FR locales and fail if not installed.
Check the output of `locale -a` and disable the tests if not found.
Package-Manager: Portage-2.3.72, Repoman-2.3.17
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'app-office')
-rw-r--r-- | app-office/gnucash/gnucash-3.6.ebuild | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app-office/gnucash/gnucash-3.6.ebuild b/app-office/gnucash/gnucash-3.6.ebuild index 00c0d0fd915e..ec42d91eaae7 100644 --- a/app-office/gnucash/gnucash-3.6.ebuild +++ b/app-office/gnucash/gnucash-3.6.ebuild @@ -122,6 +122,26 @@ src_test() { "${BUILD_DIR}"/common/test-core/ || die fi + LOCALE_TESTS= + if type locale >/dev/null 2>&1; then + MY_LOCALES="$(locale -a)" + if [[ "${MY_LOCALES}" != *en_US* || + "${MY_LOCALES}" != *en_GB* || + "${MY_LOCALES}" != *fr_FR* ]] ; then + ewarn "Missing one or more of en_US, en_GB, or fr_FR locales." + else + LOCALE_TESTS=true + fi + else + ewarn "'locale' not found." + fi + + if [[ ! ${LOCALE_TESTS} ]]; then + ewarn "Disabling test-qof and test-gnc-numeric." + echo 'set(CTEST_CUSTOM_TESTS_IGNORE test-qof test-gnc-numeric)' \ + > "${BUILD_DIR}"/CTestCustom.cmake || die + fi + cd "${BUILD_DIR}" || die XDG_DATA_HOME="${T}/$(whoami)" emake check } |