# but we currently don't support that. Assembler testcases aren't usually
# that elaborate anyway. :-)
-proc gas-dg-test { prog do_what tool_flags default_tool_flags libs } {
+proc gas-dg-test { prog do_what tool_flags } {
+ # FIXME: the gas testsuite doesn't define tmpdir. Use outdir?
+ set output_file "./a.out"
+
switch $do_what {
"preprocess" {
}
"link" {
}
"run" {
+ # This is the only place where we care if an executable was
+ # created or not. If it was, dg.exp will try to run it.
+ catch "exec rm -f $output_file"
+ }
+ default {
+ perror "$do_what: not a valid dg-do keyword"
+ return ""
}
}
}
# FIXME: This should be gas_start but it doesn't set comp_output.
- gas_run $prog $tool_flags ""
+ return [gas_run $prog $tool_flags ""]
}
proc gas-dg-prune { system text } {