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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-binutils/] [binutils-2.19.1/] [cgen/] [testsuite/] [location-1.test] - Blame information for rev 7

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 6 jlechner
# location testcase #1 -*- shell-script -*-
2
 
3
test=location-1
4
 
5
source ./test-utils.sh
6
 
7
cpu_file=${test}.test.cpu
8
rm -f ${cpu_file}
9
 
10
cat > ${cpu_file} <
11
(include "${srcdir}/../cpu/simplify.inc")
12
(include "${srcdir}/testsuite.cpu")
13
 
14
(define-pmacro test-insns (add sub))
15
 
16
(define-pmacro (define-test-insn name)
17
  (bad-command name)
18
)
19
 
20
(.for-each (.pmacro (name)
21
             (.exec (define-test-insn name)))
22
           test-insns)
23
EOF
24
 
25
run_cgen -f ${cpu_file}
26
 
27
# Find line with "bad-command".
28
bad_loc=$(grep -n "bad-command" ${cpu_file} | sed -e 's/:.*$//')
29
 
30
if ! grep -q "unknown entry type:" ${test_output_file}
31
then
32
    fail "bad command not detected"
33
elif ! grep -q "${cpu_file}:${bad_loc}:.*: unknown entry type:" ${test_output_file}
34
then
35
    fail "bad command not detected on correct line"
36
fi
37
 
38
finish

powered by: WebSVN 2.1.0

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