5
# the default user in the adt env is "ubuntu"
8
echo "Running as uid $(id -u)"
11
# we don't like running as root in the adt environment
12
if $(id $USER >/dev/null); then
13
if [ "$(id -u)" = "0" ]; then
14
# create a apt-xapian-index for the tests
15
update-apt-xapian-index
16
# the ADT basedir is 0700 so non-root have a hard time
17
ADT_BASEDIR=$ADTTMP/../..
18
echo "FIXING owner in ${ADT_BASEDIR} to user $USER"
19
chown -R $USER ${ADT_BASEDIR}
20
echo "Switching to user $USER"
21
su -lc "cd $PWD; sh $0" $USER
25
if ! xvfb-run ./run-tests.sh; then
26
# show all the failures for easier analyzing
27
cat ./tests/output/*.FAIL