~walkerlee/totem/pre-interview

« back to all changes in this revision

Viewing changes to build-aux/test-driver

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-05-26 00:07:51 UTC
  • mfrom: (1.6.1) (24.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20130526000751-kv8ap3x1di4qq8j2
Tags: 3.8.2-0ubuntu1
* Sync with Debian. Remaining changes: 
* debian/control.in:
  - Drop build-depends on libepc-ui-dev and libgrilo-0.2-dev (in universe)
  - Drop libxtst-dev build-depends so that the (redundant) fake key presses
    for inhibiting the screensaver are disabled (LP: #1007438)
  - Build-depend on libzeitgeist-dev
  - Suggest rather than recommend gstreamer components in universe
  - Add totem-plugins-extra
  - Add XB-Npp-Description and XB-Npp-Filename header to the 
    totem-mozilla package to improve ubufox/ubuntu plugin db integration 
  - Refer to Firefox in totem-mozilla description instead of Iceweasel
  - Don't have totem-mozilla recommend any particular browser
  - Drop obsolete python library dependencies since iplayer is no longer
    included
* debian/totem-common.install, debian/source_totem.py:
  - Install Ubuntu apport debugging hook
* debian/totem-plugins-extra.install:
  - Universe plugins split out of totem-plugins (currently only gromit)
* debian/totem-plugins.install:    
  - Skip the plugins split to -extra and add the zeitgeist plugin
* debian/rules:
  - Build with --fail-missing, to ensure we install everything. 
    + Ignore libtotem.{,l}a since we delibrately don't install these.
  - Re-enable hardening, make sure both PIE and BINDNOW are used
    by setting hardening=+all. (LP: #1039604)
* debian/patches/91_quicklist_entries.patch:
  - Add static quicklist
* debian/patches/92_gst-plugins-good.patch:
  - Build without unnecessary gstreamer1.0-bad dependency
* debian/patches/93_grilo_optional.patch:
  - Allow building without grilo while grilo MIR is still pending
* debian/patches/correct_desktop_mimetypes.patch:
  - Don't list the mimetypes after the unity lists
* debian/patches/revert_shell_menu.patch: 
  - revert the use of a shell menu until indicator-appmenu can handle
    the mixed shell/traditional menus itself
* New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# test-driver - basic testsuite driver script.
 
3
 
 
4
scriptversion=2012-06-27.10; # UTC
 
5
 
 
6
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
 
7
#
 
8
# This program is free software; you can redistribute it and/or modify
 
9
# it under the terms of the GNU General Public License as published by
 
10
# the Free Software Foundation; either version 2, or (at your option)
 
11
# any later version.
 
12
#
 
13
# This program is distributed in the hope that it will be useful,
 
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
# GNU General Public License for more details.
 
17
#
 
18
# You should have received a copy of the GNU General Public License
 
19
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
20
 
 
21
# As a special exception to the GNU General Public License, if you
 
22
# distribute this file as part of a program that contains a
 
23
# configuration script generated by Autoconf, you may include it under
 
24
# the same distribution terms that you use for the rest of that program.
 
25
 
 
26
# This file is maintained in Automake, please report
 
27
# bugs to <bug-automake@gnu.org> or send patches to
 
28
# <automake-patches@gnu.org>.
 
29
 
 
30
# Make unconditional expansion of undefined variables an error.  This
 
31
# helps a lot in preventing typo-related bugs.
 
32
set -u
 
33
 
 
34
usage_error ()
 
35
{
 
36
  echo "$0: $*" >&2
 
37
  print_usage >&2
 
38
  exit 2
 
39
}
 
40
 
 
41
print_usage ()
 
42
{
 
43
  cat <<END
 
44
Usage:
 
45
  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
 
46
              [--expect-failure={yes|no}] [--color-tests={yes|no}]
 
47
              [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
 
48
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
 
49
END
 
50
}
 
51
 
 
52
# TODO: better error handling in option parsing (in particular, ensure
 
53
# TODO: $log_file, $trs_file and $test_name are defined).
 
54
test_name= # Used for reporting.
 
55
log_file=  # Where to save the output of the test script.
 
56
trs_file=  # Where to save the metadata of the test run.
 
57
expect_failure=no
 
58
color_tests=no
 
59
enable_hard_errors=yes
 
60
while test $# -gt 0; do
 
61
  case $1 in
 
62
  --help) print_usage; exit $?;;
 
63
  --version) echo "test-driver $scriptversion"; exit $?;;
 
64
  --test-name) test_name=$2; shift;;
 
65
  --log-file) log_file=$2; shift;;
 
66
  --trs-file) trs_file=$2; shift;;
 
67
  --color-tests) color_tests=$2; shift;;
 
68
  --expect-failure) expect_failure=$2; shift;;
 
69
  --enable-hard-errors) enable_hard_errors=$2; shift;;
 
70
  --) shift; break;;
 
71
  -*) usage_error "invalid option: '$1'";;
 
72
  esac
 
73
  shift
 
74
done
 
75
 
 
76
if test $color_tests = yes; then
 
77
  # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
 
78
  red='' # Red.
 
79
  grn='' # Green.
 
80
  lgn='' # Light green.
 
81
  blu='' # Blue.
 
82
  mgn='' # Magenta.
 
83
  std=''     # No color.
 
84
else
 
85
  red= grn= lgn= blu= mgn= std=
 
86
fi
 
87
 
 
88
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
 
89
trap "st=129; $do_exit" 1
 
90
trap "st=130; $do_exit" 2
 
91
trap "st=141; $do_exit" 13
 
92
trap "st=143; $do_exit" 15
 
93
 
 
94
# Test script is run here.
 
95
"$@" >$log_file 2>&1
 
96
estatus=$?
 
97
if test $enable_hard_errors = no && test $estatus -eq 99; then
 
98
  estatus=1
 
99
fi
 
100
 
 
101
case $estatus:$expect_failure in
 
102
  0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
 
103
  0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
 
104
  77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
 
105
  99:*)  col=$mgn res=ERROR recheck=yes gcopy=yes;;
 
106
  *:yes) col=$lgn res=XFAIL recheck=no  gcopy=yes;;
 
107
  *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
 
108
esac
 
109
 
 
110
# Report outcome to console.
 
111
echo "${col}${res}${std}: $test_name"
 
112
 
 
113
# Register the test result, and other relevant metadata.
 
114
echo ":test-result: $res" > $trs_file
 
115
echo ":global-test-result: $res" >> $trs_file
 
116
echo ":recheck: $recheck" >> $trs_file
 
117
echo ":copy-in-global-log: $gcopy" >> $trs_file
 
118
 
 
119
# Local Variables:
 
120
# mode: shell-script
 
121
# sh-indentation: 2
 
122
# eval: (add-hook 'write-file-hooks 'time-stamp)
 
123
# time-stamp-start: "scriptversion="
 
124
# time-stamp-format: "%:y-%02m-%02d.%02H"
 
125
# time-stamp-time-zone: "UTC"
 
126
# time-stamp-end: "; # UTC"
 
127
# End: