~chromium-team/chromium-browser/artful-beta

« back to all changes in this revision

Viewing changes to debian/tests/smoketest

  • Committer: Chad Miller
  • Date: 2013-07-05 15:32:43 UTC
  • mto: This revision was merged to the branch mainline in revision 912.
  • Revision ID: chad.miller@canonical.com-20130705153243-6ar802i7dxk5do15
First attempt at autopkgtests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
# A thin wrapper that sets up an environment, runs a test, and exits with an
 
4
# error if the test does not write a file indicating success.
 
5
# Copyright Canonical, 2013.   Author: Chad MILLER <chad.miller@canonical.com>
 
6
 
 
7
set -o errexit
 
8
#set -o xtrace
 
9
set -o nounset
 
10
 
 
11
SRCDIR=$(pwd)
 
12
WORKDIR=$(mktemp -d)
 
13
trap "rm -rf ${WORKDIR}" EXIT INT QUIT ABRT PIPE TERM
 
14
 
 
15
ulimit -c unlimited
 
16
 
 
17
script=$(readlink -m -- ${0}-actual)
 
18
 
 
19
cd ${WORKDIR}
 
20
LC_ALL=C HOME=${WORKDIR} xvfb-run ${script} ${SRCDIR} 2>&1
 
21
 
 
22
test -f ${WORKDIR}/result-success && echo PASS || echo FAIL