blob: c696bbd6c622832d5bcc05f30808c5217df9264f [file] [log] [blame]
The Android Open Source Projectc24a8e62009-03-03 19:28:42 -08001#!/bin/bash
2#
3# Copyright (C) 2007 The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# Set up prog to be the path of this script, including following symlinks,
18# and set up progdir to be the fully-qualified pathname of its directory.
19prog="$0"
20while [ -h "${prog}" ]; do
21 newProg=`/bin/ls -ld "${prog}"`
22 newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
23 if expr "x${newProg}" : 'x/' >/dev/null; then
24 prog="${newProg}"
25 else
26 progdir=`dirname "${prog}"`
27 prog="${progdir}/${newProg}"
28 fi
29done
30oldwd=`pwd`
31progdir=`dirname "${prog}"`
32cd "${progdir}"
33progdir=`pwd`
34prog="${progdir}"/`basename "${prog}"`
35
36passed=0
37skipped=0
38skipNames=""
39failed=0
40failNames=""
41
42for i in *; do
43 if [ -d "$i" -a -r "$i" ]; then
44 ./one-test "$i"
45 status=$?
46 if [ "$status" = "0" ]; then
47 ((passed += 1))
48 elif [ "$status" = "2" ]; then
49 ((skipped += 1))
50 skipNames="$skipNames $i"
51 else
52 ((failed += 1))
53 failNames="$failNames $i"
54 fi
55 fi
56done
57
58echo "passed: $passed test(s)"
59echo "skipped: $skipped test(s)"
60
61for i in $skipNames; do
62 echo "skipped: $i"
63done
64
65echo "failed: $failed test(s)"
66
67for i in $failNames; do
68 echo "failed: $i"
69done