~ubuntu-branches/ubuntu/dapper/dpatch/dapper

« back to all changes in this revision

Viewing changes to tests/run-test.sh

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2005-12-16 08:16:54 UTC
  • Revision ID: james.westby@ubuntu.com-20051216081654-9or0cuc9nzsszob7
Tags: 2.0.16
* Bug fix: "dpatch: manpage typo: s/ th / the /", thanks to Justin
  Pryzby (Closes: #337160).
* Bug fix: "dpatch suggests wrong cpp build dependency", thanks to
  Matthias Klose (Closes: #333005).
* Bug fix: "examples/rules/rules.new.non-dh.gz uses undocumented
  --with-cpp option", thanks to Matthias Klose (Closes: #333006).
* Bug fix: "dpatch-edit-patch should fail when no patchname specified",
  thanks to Charles Fry (Closes: #328731).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
# run the tests
 
3
# see ./README for details.
 
4
 
 
5
set -e
 
6
export TESTDIR=$(mktemp -d)
 
7
export PKGPATH="$TESTDIR/dpatch-test"
 
8
export LANG=C 
 
9
export LC_ALL=C
 
10
export SOURCE_DIR=$(pwd)
 
11
 
 
12
(
 
13
set -ex
 
14
run_test () {
 
15
    echo $1
 
16
    chmod a+x $1
 
17
    (
 
18
    sed -n 's/^##:/  /p' < $1
 
19
    echo 
 
20
    if ./$1 2>&1; then
 
21
        echo [OK] $1 >> test.log.summary
 
22
    else
 
23
        echo [FAIL] $1 >> test.log.summary
 
24
    fi
 
25
    ) | tee log/$1.tmp
 
26
 
 
27
    # process /tmp/XXX/ dir pathnames so that we have consistent log output
 
28
    # every time; helps to have a consistent output.
 
29
    sed -e's,/tmp/[^/]*/,/tmp/XXXX/,g' < log/$1.tmp > log/$1.log
 
30
    rm log/$1.tmp
 
31
}
 
32
: > test.log.summary
 
33
 
 
34
for TEST in [0-9][0-9]_*.sh; do
 
35
    run_test "$TEST"
 
36
done
 
37
 
 
38
rm -r "$TESTDIR"
 
39
)