~ubuntu-branches/ubuntu/raring/software-center/raring-proposed

« back to all changes in this revision

Viewing changes to debian/tests/run-tests

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2012-10-11 15:33:05 UTC
  • mfrom: (195.1.18 quantal)
  • Revision ID: package-import@ubuntu.com-20121011153305-fm5ln7if3rpzts4n
Tags: 5.4.1.1
* lp:~mvo/software-center/reinstall-previous-purchase-token-fix:
  - fix reinstall previous purchases that have a system-wide
    license key LP: #1065481
* lp:~mvo/software-center/lp1060106:
  - Add missing gettext init for utils/update-software-center-agent
    (LP: #1060106)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
exec 2>&1
 
3
set -ex
 
4
 
 
5
# the default user in the adt env is "ubuntu"
 
6
USER=ubuntu
 
7
 
 
8
echo "Running as uid $(id -u)"
 
9
unset TMPDIR
 
10
 
 
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
 
22
    fi
 
23
fi
 
24
 
 
25
if ! xvfb-run ./run-tests.sh; then
 
26
    # show all the failures for easier analyzing
 
27
    cat ./tests/output/*.FAIL
 
28
    exit 1
 
29
fi
 
30