diff options
author | Niels Möller <nisse@lysator.liu.se> | 2012-11-22 23:40:46 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2012-11-22 23:40:46 +0100 |
commit | 4b85f67d3700b6ac582032ff9b36172e74780b9c (patch) | |
tree | 8fd0ee33c364eae9ea9a63b7ebae6317044d9c53 | |
parent | 79f4ded005bdc2410ec7d75f07a6b60ee6cf8b75 (diff) | |
download | nettle-4b85f67d3700b6ac582032ff9b36172e74780b9c.tar.gz |
run-tests: Added (c) notice. Some whitespace cleanup.
-rwxr-xr-x | run-tests | 29 |
1 files changed, 22 insertions, 7 deletions
@@ -1,5 +1,21 @@ #! /bin/sh +# Copyright (C) 2000, 2001, 2002, 2004, 2005, 2011, 2012 Niels Möller +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + failed=0 all=0 @@ -13,7 +29,7 @@ fi export srcdir # When used in make rules, we sometimes get the filenames VPATH -# expanded, but usually not. +# expanded, but usually not. find_program () { case "$1" in */*) @@ -48,14 +64,14 @@ test_program () { fi case "$?" in 0) - echo PASS: $testname + echo PASS: $testname all=`expr $all + 1` ;; 77) - echo SKIP: $testname + echo SKIP: $testname ;; *) - echo FAIL: $testname + echo FAIL: $testname failed=`expr $failed + 1` all=`expr $all + 1` ;; @@ -74,7 +90,7 @@ do testflags='-v' ;; -*) - echo >&2 'Unknown option `'"$1'" + echo >&2 'Unknown option `'"$1'" exit 1 ;; *) @@ -83,7 +99,7 @@ do esac shift done - + if [ $# -eq 0 ] ; then for f in *-test; do test_program "./$f"; done else @@ -105,4 +121,3 @@ if [ "x$debug" = xno ] ; then fi [ "$failed" -eq 0 ] - |