New file (interfaces to dg.exp).
[deliverable/binutils-gdb.git] / gas / testsuite / lib / gas-dg.exp
1 # Define gas callbacks for dg.exp.
2
3 load_lib dg.exp
4
5 # The use of this function is still in a bit of flux.
6 # It should be theoretically possible to assemble, link, and run a file
7 # but we currently don't support that. Assembler testcases aren't usually
8 # that elaborate anyway. :-)
9
10 proc gas-dg-test { prog do_what tool_flags default_tool_flags libs } {
11 switch $do_what {
12 "preprocess" {
13 }
14 "assemble" {
15 }
16 "link" {
17 }
18 "run" {
19 }
20 }
21
22 # gas_start prepends $srcdir/$subdir so we must remove it from PROG
23 # if present. First remove extraneous //'s.
24 global srcdir subdir
25 set dir "$srcdir/$subdir"
26 regsub -all "//" $dir "/" dir
27 regsub -all "//" $prog "/" prog
28 if [string match "$dir/*" $prog] {
29 regsub "$dir" $prog "" prog
30 }
31
32 # FIXME: This should be gas_start but it doesn't set comp_output.
33 gas_run $prog $tool_flags ""
34 }
35
36 proc gas-dg-prune { system text } {
37 #send_user "Before:$text\n"
38 regsub -all "(^|\n)\[^\n\]*: Assembler messages:\[^\n\]*" $text "" text
39 regsub -all "(^|\n)\[^\n\]*: End of file not at end\[^\n\]*Newline inserted." $text "" text
40 #send_user "After:$text\n"
41
42 return $text
43 }
This page took 0.037722 seconds and 4 git commands to generate.