From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1116372-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 0BE6B138334
	for <garchives@archives.gentoo.org>; Sun, 13 Oct 2019 11:41:02 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 3256DE0858;
	Sun, 13 Oct 2019 11:41:01 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 12760E0858
	for <gentoo-commits@lists.gentoo.org>; Sun, 13 Oct 2019 11:41:01 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id BDDE134BCAF
	for <gentoo-commits@lists.gentoo.org>; Sun, 13 Oct 2019 11:40:59 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 17CFB897
	for <gentoo-commits@lists.gentoo.org>; Sun, 13 Oct 2019 11:40:58 +0000 (UTC)
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org>
Message-ID: <1570966823.4813cf4d608daced07623cdcd783fdc7b0a82186.asturm@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/gnucash/
X-VCS-Repository: repo/gentoo
X-VCS-Files: app-office/gnucash/gnucash-3.6.ebuild
X-VCS-Directories: app-office/gnucash/
X-VCS-Committer: asturm
X-VCS-Committer-Name: Andreas Sturmlechner
X-VCS-Revision: 4813cf4d608daced07623cdcd783fdc7b0a82186
X-VCS-Branch: master
Date: Sun, 13 Oct 2019 11:40:58 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: e75e5e8f-8ac8-4175-8da0-39f0cf0bfb8a
X-Archives-Hash: 42ae30dabb82390e2a147080c43d79f2

commit:     4813cf4d608daced07623cdcd783fdc7b0a82186
Author:     Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Sun Aug 25 23:26:04 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct 13 11:40:23 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4813cf4d

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 <AT> gmail.com>
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 app-office/gnucash/gnucash-3.6.ebuild | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/app-office/gnucash/gnucash-3.6.ebuild b/app-office/gnucash/gnucash-3.6.ebuild
index 00c0d0fd915..ec42d91eaae 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
 }