~chromium-team/chromium-browser/saucy-proposed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

# A thin wrapper that sets up an environment, runs a test, and exits with an
# error if the test does not write a file indicating success.
# Copyright Canonical, 2013.   Author: Chad MILLER <chad.miller@canonical.com>

set -o errexit
#set -o xtrace
set -o nounset

SRCDIR=$(pwd)
WORKDIR=$(mktemp -d)
trap "rm -rf ${WORKDIR}" EXIT INT QUIT ABRT PIPE TERM

ulimit -c unlimited

script=$(readlink -m -- ${0}-actual)

cd ${WORKDIR}
LC_ALL=C HOME=${WORKDIR} xvfb-run ${script} ${SRCDIR} 2>&1

test -f ${WORKDIR}/result-success && echo PASS || echo FAIL