~ubuntu-branches/ubuntu/utopic/nettle/utopic

« back to all changes in this revision

Viewing changes to run-tests

  • Committer: Package Import Robot
  • Author(s): Magnus Holmgren
  • Date: 2013-03-24 11:38:21 UTC
  • mto: (1.4.6) (3.1.11 experimental)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: package-import@ubuntu.com-20130324113821-3rsmekqi09c93lnh
Tags: upstream-2.6
Import upstream version 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
 
 
3
# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2011, 2012  Niels Möller
 
4
#
 
5
# This program is free software; you can redistribute it and/or modify
 
6
# it under the terms of the GNU General Public License as published by
 
7
# the Free Software Foundation; either version 2 of the License, or
 
8
# (at your option) any later version.
 
9
#
 
10
# This program is distributed in the hope that it will be useful,
 
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
# GNU General Public License for more details.
 
14
#
 
15
# You should have received a copy of the GNU General Public License along
 
16
# with this program; if not, write to the Free Software Foundation, Inc.,
 
17
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
18
 
3
19
failed=0
4
20
all=0
5
21
 
13
29
export srcdir
14
30
 
15
31
# When used in make rules, we sometimes get the filenames VPATH
16
 
# expanded, but usually not. 
 
32
# expanded, but usually not.
17
33
find_program () {
18
34
    case "$1" in
19
35
        */*)
44
60
  if [ -z "$EMULATOR" ] || head -1 "$1" | grep '^#!' > /dev/null; then
45
61
    "$1" $testflags
46
62
  else
47
 
    "$EMULATOR" "$1" $testflags
 
63
    $EMULATOR "$1" $testflags
48
64
  fi
49
65
  case "$?" in
50
66
      0)
51
 
        echo PASS: $testname
 
67
        echo PASS: $testname
52
68
        all=`expr $all + 1`
53
69
        ;;
54
70
      77)
55
 
        echo SKIP: $testname
 
71
        echo SKIP: $testname
56
72
      ;;
57
73
      *)
58
 
        echo FAIL: $testname
 
74
        echo FAIL: $testname
59
75
        failed=`expr $failed + 1`
60
76
        all=`expr $all + 1`
61
77
        ;;
74
90
    testflags='-v'
75
91
    ;;
76
92
  -*)
77
 
    echo >&2 'Unknown option `'"$1'" 
 
93
    echo >&2 'Unknown option `'"$1'"
78
94
    exit 1
79
95
    ;;
80
96
  *)
83
99
  esac
84
100
  shift
85
101
done
86
 
  
 
102
 
87
103
if [ $# -eq 0 ] ; then
88
104
  for f in *-test; do test_program "./$f"; done
89
105
else
105
121
fi
106
122
 
107
123
[ "$failed" -eq 0 ]
108