commit: 10bc08d434359547031d488a35bc721ad36d6b4e
Author: Peter Levine <plevine457 <AT> gmail <DOT> com>
AuthorDate: Sun Sep 15 20:09:53 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Oct 13 11:40:25 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=10bc08d4
app-office/gnucash: Fix testcases that write to /tmp
Have testcases write to "${T}" instead of /tmp
Closes: https://github.com/gentoo/gentoo/pull/12792
Package-Manager: Portage-2.3.75, 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.7.ebuild | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/app-office/gnucash/gnucash-3.7.ebuild
b/app-office/gnucash/gnucash-3.7.ebuild
index 699125271a4..824af8b7d91 100644
--- a/app-office/gnucash/gnucash-3.7.ebuild
+++ b/app-office/gnucash/gnucash-3.7.ebuild
@@ -97,6 +97,23 @@ src_unpack() {
|| die "Failed copying scm"
}
+src_prepare() {
+ cmake-utils_src_prepare
+
+ # Fix tests writing to /tmp
+ local fixtestfiles=(
+
"${S}"/gnucash/report/report-system/test/test-commodity-utils.scm
+ "${S}"/gnucash/report/report-system/test/test-extras.scm
+ "${S}"/gnucash/report/report-system/test/test-report-html.scm
+ "${S}"/gnucash/report/report-system/test/test-report-system.scm
+ "${S}"/libgnucash/backend/xml/test/test-xml-pricedb.cpp
+ "${S}"/libgnucash/backend/dbi/test/test-backend-dbi-basic.cpp
+ )
+ for x in "${fixtestfiles[@]}"; do
+ sed -i -e "s|\"/tmp/|\"${T}/|g" "${x}" || die "sed of "${x}"
failed"
+ done
+}
+
src_configure() {
export GUILE_AUTO_COMPILE=0