Gentoo Archives: gentoo-commits

From: Ian Delaney <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/classified-ads/
Date: Sun, 27 Dec 2015 10:08:33
Message-Id: 1451094436.537312b16550a72b3881d79377a670bc3b29e7e8.idella4@gentoo
1 commit: 537312b16550a72b3881d79377a670bc3b29e7e8
2 Author: Antti Jarvinen <antti.jarvinen <AT> katiska <DOT> org>
3 AuthorDate: Sat Dec 26 01:47:16 2015 +0000
4 Commit: Ian Delaney <idella4 <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 26 01:47:16 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=537312b1
7
8 net-p2p/classified-ads: Bug 568874 - use correct qmake version
9
10 Due to comments at https://github.com/gentoo/gentoo/pull/500
11 simplified src_test somewhat. Tried out with sandbox and
12 without, with failing test case and all-passing case:
13 seems to work.
14
15 Package-Manager: portage-2.2.20.1
16
17 .../classified-ads-0.09_p20151220.ebuild | 23 ++++++++--------------
18 1 file changed, 8 insertions(+), 15 deletions(-)
19
20 diff --git a/net-p2p/classified-ads/classified-ads-0.09_p20151220.ebuild b/net-p2p/classified-ads/classified-ads-0.09_p20151220.ebuild
21 index 8f5b26d..df2195a 100644
22 --- a/net-p2p/classified-ads/classified-ads-0.09_p20151220.ebuild
23 +++ b/net-p2p/classified-ads/classified-ads-0.09_p20151220.ebuild
24 @@ -58,25 +58,18 @@ src_test() {
25 cd test || die "test suite missing"
26 "$(qt4_get_bindir)"/qmake || die "test suite configure failed"
27 emake
28 -
29 - if [ -e $HOME/.classified_ads/sqlite_db ]; then
30 - mv $HOME/.classified_ads/sqlite_db $HOME/.classified_ads/sqlite_db.backup \
31 - || die "datafile backup failed"
32 - fi
33 + # test suite will create files under $HOME, set $HOME to point to
34 + # safe location, ideas stolen from
35 + # eclass/distutils-r1.eclass func distutils_install_for_testing
36 + BACKUP_HOME=$HOME
37 + export HOME=${BUILD_DIR}/tmp
38 + mkdir -p $HOME || true
39 ./testca
40 result=$?
41 - rm -f $HOME/.classified_ads/sqlite_db
42 -
43 - if [ -e $HOME/.classified_ads/sqlite_db.backup ]; then
44 - mv $HOME/.classified_ads/sqlite_db.backup $HOME/.classified_ads/sqlite_db \
45 - || die "datafile restore failed"
46 - fi
47 -
48 + export HOME=$BACKUP_HOME
49 if [ $result != "0" ]; then
50 - die "test failed with code $result"
51 + die "test suite failed with error code " `echo $result`
52 fi
53 -
54 - return $result
55 }
56
57 src_install() {