~ubuntu-branches/ubuntu/trusty/postgresql-common/trusty-proposed

« back to all changes in this revision

Viewing changes to testsuite

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, Christoph Berg, Martin Pitt
  • Date: 2012-12-16 18:57:12 UTC
  • mfrom: (48.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20121216185712-wmemk5zlcz2h781h
[ Christoph Berg ]
* testsuite: start localhost interface which is down after unshare -n.

[ Martin Pitt ]
* testsuite: Stop currently running clusters, just as the script has done
  until 136.
* testsuite: Use a more elegant way of re-execing ourselves through unshare.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
set -e
20
20
 
21
21
# call ourselves through unshare in a way that keeps normal stdin
22
 
unshare -uimn sh -- -c "`tail -n +25 $0`" "$0" "$@"
23
 
exit $?
 
22
if [ -z "$UNSHARED" ]; then
 
23
    UNSHARED=1 exec unshare -uimn "$0" "$@"
 
24
fi
24
25
 
25
26
# unshared program starts here
26
27
set -e
53
54
    exit 1
54
55
fi
55
56
 
 
57
# stop currently running clusters
 
58
if [ -x "/etc/init.d/postgresql" ]; then
 
59
    /etc/init.d/postgresql stop
 
60
fi
 
61
 
56
62
# let everything happen in overlay tmpfses to avoid interfering with already
57
63
# existing clusters; this also speeds up testing
58
64
created_dirs=""
75
81
# reset core limit for pg_ctl tests
76
82
ulimit -S -c 0
77
83
 
 
84
# start localhost interface
 
85
ifconfig lo up
 
86
 
78
87
# set variables which cause taint check errors
79
88
export IFS=' '
80
89
export CDPATH=/usr