OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-binutils/] [binutils-2.19.1/] [cgen/] [testsuite/] [run-tests.sh] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 jlechner
#! /bin/sh
2
# The tests pass if three things happen:
3
# 1) runs to completion
4
# 2) does not print any lines with "FAIL"
5
# 3) a wrapper program successfully verifies MATCH/EXPECTED output
6
 
7
# The names of tests to run, or ""/"all".
8
test_list="$@"
9
[ "$test_list" == "" ] && test_list=all
10
 
11
test="driver"
12
source ./test-utils.sh
13
 
14
fail_count=0
15
pass_count=0
16
 
17
for test in `cd ${srcdir} && ls -1 *.test`
18
do
19
    if [ "${test_list}" != "all" ]
20
    then
21
        cases="`echo ${test_list} | sed -e 's/ /,/g' | sed -e 's/,/|/g'`"
22
        # Use an eval here so that $cases gets evaluated first.
23
        eval "case $test in \
24
        $cases) ;; \
25
        *) continue ;; \
26
        esac"
27
    fi
28
 
29
    if ${SHELL} ${srcdir}/$test
30
    then
31
        pass_count=$(( ${pass_count} + 1 ))
32
    else
33
        fail_count=$(( ${fail_count} + 1 ))
34
    fi
35
done
36
 
37
echo ""
38
echo "Test summary:"
39
echo "# failures: ${fail_count}"
40
echo "# passes:   ${pass_count}"
41
 
42
if [ ${fail_count} == 0 ]
43
then
44
    exit 0
45
else
46
    exit 1
47
fi

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.