summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntti Jarvinen <antti.jarvinen@katiska.org>2015-12-26 03:47:16 +0200
committerAntti Jarvinen <antti.jarvinen@katiska.org>2015-12-26 03:47:16 +0200
commit537312b16550a72b3881d79377a670bc3b29e7e8 (patch)
treefc5108416a7bb6d76f195144ab98b3c3d3edc8e4 /net-p2p
parentnet-p2p/classified-ads: Fix bug 568874 - use correct qmake version (diff)
downloadgentoo-537312b16550a72b3881d79377a670bc3b29e7e8.tar.gz
gentoo-537312b16550a72b3881d79377a670bc3b29e7e8.tar.bz2
gentoo-537312b16550a72b3881d79377a670bc3b29e7e8.zip
net-p2p/classified-ads: Bug 568874 - use correct qmake version
Due to comments at https://github.com/gentoo/gentoo/pull/500 simplified src_test somewhat. Tried out with sandbox and without, with failing test case and all-passing case: seems to work. Package-Manager: portage-2.2.20.1
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/classified-ads/classified-ads-0.09_p20151220.ebuild23
1 files changed, 8 insertions, 15 deletions
diff --git a/net-p2p/classified-ads/classified-ads-0.09_p20151220.ebuild b/net-p2p/classified-ads/classified-ads-0.09_p20151220.ebuild
index 8f5b26d2453f..df2195ac8b06 100644
--- a/net-p2p/classified-ads/classified-ads-0.09_p20151220.ebuild
+++ b/net-p2p/classified-ads/classified-ads-0.09_p20151220.ebuild
@@ -58,25 +58,18 @@ src_test() {
cd test || die "test suite missing"
"$(qt4_get_bindir)"/qmake || die "test suite configure failed"
emake
-
- if [ -e $HOME/.classified_ads/sqlite_db ]; then
- mv $HOME/.classified_ads/sqlite_db $HOME/.classified_ads/sqlite_db.backup \
- || die "datafile backup failed"
- fi
+ # test suite will create files under $HOME, set $HOME to point to
+ # safe location, ideas stolen from
+ # eclass/distutils-r1.eclass func distutils_install_for_testing
+ BACKUP_HOME=$HOME
+ export HOME=${BUILD_DIR}/tmp
+ mkdir -p $HOME || true
./testca
result=$?
- rm -f $HOME/.classified_ads/sqlite_db
-
- if [ -e $HOME/.classified_ads/sqlite_db.backup ]; then
- mv $HOME/.classified_ads/sqlite_db.backup $HOME/.classified_ads/sqlite_db \
- || die "datafile restore failed"
- fi
-
+ export HOME=$BACKUP_HOME
if [ $result != "0" ]; then
- die "test failed with code $result"
+ die "test suite failed with error code " `echo $result`
fi
-
- return $result
}
src_install() {