Commit 485b51a7 by Mark Mitchell

linkage.exp: Do not run on remote hosts.

	* gcc.misc-tests/linkage.exp: Do not run on remote hosts.
	* lib/compat.exp (compat-run): Use file_on_host, not remote_file
	build.
	(compat-execute): Likewise.
	* lib/copy-file.exp (gcc_copy_files): Use remote_download to copy
	files to remote hosts.
	* lib/c-ctorture.exp (c-torture-compile): Likewise.
	(c-torture-execute): Likewise.
	* lib/dg-pch.exp (dg-pch): Use file_on_host, not remote_file build
	or plain file.  Use remote_upload and remote_download to copy
	files about.
	* lib/scanasm.exp (dg-scan): Upload the file from the remote host
	before scanning it.

From-SVN: r123914
parent f2eb49dc
2007-04-17 Mark Mitchell <mark@codesourcery.com>
* gcc.misc-tests/linkage.exp: Do not run on remote hosts.
* lib/compat.exp (compat-run): Use file_on_host, not remote_file
build.
(compat-execute): Likewise.
* lib/copy-file.exp (gcc_copy_files): Use remote_download to copy
files to remote hosts.
* lib/c-ctorture.exp (c-torture-compile): Likewise.
(c-torture-execute): Likewise.
* lib/dg-pch.exp (dg-pch): Use file_on_host, not remote_file build
or plain file. Use remote_upload and remote_download to copy
files about.
* lib/scanasm.exp (dg-scan): Upload the file from the remote host
before scanning it.
2007-04-17 Dorit Nuzman <dorit@il.ibm.com> 2007-04-17 Dorit Nuzman <dorit@il.ibm.com>
* gcc.dg/vect/no-tree-scev-cprop-vect-iv-3.c: New test. * gcc.dg/vect/no-tree-scev-cprop-vect-iv-3.c: New test.
...@@ -55,6 +71,7 @@ ...@@ -55,6 +71,7 @@
* g++.dg/warn/anonymous-namespace-1.C: New test * g++.dg/warn/anonymous-namespace-1.C: New test
* g++.dg/warn/anonymous-namespace-1.h: New test * g++.dg/warn/anonymous-namespace-1.h: New test
>>>>>>> .r123913
2007-04-14 Andrew Pinski <andrew_pinski@playstation.sony.com> 2007-04-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR testsuite/31578 PR testsuite/31578
...@@ -224,6 +241,7 @@ ...@@ -224,6 +241,7 @@
* lib/target-supports.exp * lib/target-supports.exp
(check_effective_target_fstack_protector): Rewrite. (check_effective_target_fstack_protector): Rewrite.
>>>>>>> .r123860
2007-04-09 Mark Mitchell <mark@codesourcery.com> 2007-04-09 Mark Mitchell <mark@codesourcery.com>
PR c++/31449 PR c++/31449
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# was written by Rob Savoye. (rob@cygnus.com) # was written by Rob Savoye. (rob@cygnus.com)
# All the other tests driven by that file have since been moved elsewhere. # All the other tests driven by that file have since been moved elsewhere.
if [isnative] then { if { [isnative] && ![is_remote host] } then {
set lines [gcc_target_compile "$srcdir/$subdir/linkage-x.c" "linkage-x.o" object {additional_flags="-w"}] set lines [gcc_target_compile "$srcdir/$subdir/linkage-x.c" "linkage-x.o" object {additional_flags="-w"}]
if ![string match "" $lines] then { if ![string match "" $lines] then {
fail "$subdir/linkage.c compile" fail "$subdir/linkage.c compile"
......
...@@ -96,7 +96,7 @@ proc c-torture-compile { src option } { ...@@ -96,7 +96,7 @@ proc c-torture-compile { src option } {
set comp_output [gcc_target_compile "$src" "$output" object $options] set comp_output [gcc_target_compile "$src" "$output" object $options]
gcc_check_compile $testcase $option $output $comp_output gcc_check_compile $testcase $option $output $comp_output
remote_file build delete $output file_on_host delete $output
} }
# #
...@@ -171,7 +171,7 @@ proc c-torture-execute { sources args } { ...@@ -171,7 +171,7 @@ proc c-torture-execute { sources args } {
set ignore_me [eval $torture_eval_before_compile] set ignore_me [eval $torture_eval_before_compile]
} }
remote_file build delete $execname file_on_host delete $execname
verbose "Testing $testcase, $option" 1 verbose "Testing $testcase, $option" 1
set options "" set options ""
...@@ -183,7 +183,7 @@ proc c-torture-execute { sources args } { ...@@ -183,7 +183,7 @@ proc c-torture-execute { sources args } {
if ![gcc_check_compile "$testcase compilation" $option $execname $comp_output] { if ![gcc_check_compile "$testcase compilation" $option $execname $comp_output] {
unresolved "$testcase execution, $option" unresolved "$testcase execution, $option"
remote_file build delete $execname file_on_host delete $execname
continue continue
} }
...@@ -220,7 +220,7 @@ proc c-torture-execute { sources args } { ...@@ -220,7 +220,7 @@ proc c-torture-execute { sources args } {
# the entire process down because it usually does not "hit". # the entire process down because it usually does not "hit".
set skip 0 set skip 0
if { ![isnative] && [info exists oldexec] } { if { ![isnative] && [info exists oldexec] } {
if { [remote_file build cmp $oldexec $execname] == 0 } { if { [file_on_host cmp $oldexec $execname] == 0 } {
set skip 1 set skip 1
} }
} }
...@@ -230,14 +230,14 @@ proc c-torture-execute { sources args } { ...@@ -230,14 +230,14 @@ proc c-torture-execute { sources args } {
set output [lindex $result 1] set output [lindex $result 1]
} }
if { $oldstatus == "pass" } { if { $oldstatus == "pass" } {
remote_file build delete $oldexec file_on_host delete $oldexec
} }
$status "$testcase execution, $option" $status "$testcase execution, $option"
set oldstatus $status set oldstatus $status
} }
if [info exists status] { if [info exists status] {
if { $status == "pass" } { if { $status == "pass" } {
remote_file build delete $execname file_on_host delete $execname
} }
} }
} }
......
...@@ -115,7 +115,7 @@ proc compat-run { testname objlist dest optall optfile optstr } { ...@@ -115,7 +115,7 @@ proc compat-run { testname objlist dest optall optfile optstr } {
# Check that all of the objects were built successfully. # Check that all of the objects were built successfully.
foreach obj [split $objlist] { foreach obj [split $objlist] {
if ![file exists $obj] then { if ![file_on_host exists $obj] then {
unresolved "$testcase $testname link $optstr" unresolved "$testcase $testname link $optstr"
unresolved "$testcase $testname execute $optstr" unresolved "$testcase $testname execute $optstr"
return return
...@@ -142,7 +142,7 @@ proc compat-run { testname objlist dest optall optfile optstr } { ...@@ -142,7 +142,7 @@ proc compat-run { testname objlist dest optall optfile optstr } {
set result [${tool}_load $dest "" ""] set result [${tool}_load $dest "" ""]
set status [lindex $result 0] set status [lindex $result 0]
if { $status == "pass" } then { if { $status == "pass" } then {
remote_file build delete $dest file_on_host delete $dest
} }
$status "$testcase $testname execute $optstr" $status "$testcase $testname execute $optstr"
} }
...@@ -330,10 +330,10 @@ proc compat-execute { src1 sid use_alt } { ...@@ -330,10 +330,10 @@ proc compat-execute { src1 sid use_alt } {
set execname4 "${execbase}-${count}4" set execname4 "${execbase}-${count}4"
incr count incr count
remote_file build delete $execname1 file_on_host delete $execname1
remote_file build delete $execname2 file_on_host delete $execname2
remote_file build delete $execname3 file_on_host delete $execname3
remote_file build delete $execname4 file_on_host delete $execname4
# Compile pieces with the alternate compiler; we'll catch problems # Compile pieces with the alternate compiler; we'll catch problems
# later. Skip this if we don't have an alternate compiler. # later. Skip this if we don't have an alternate compiler.
...@@ -373,7 +373,7 @@ proc compat-execute { src1 sid use_alt } { ...@@ -373,7 +373,7 @@ proc compat-execute { src1 sid use_alt } {
if { $files != "" } { if { $files != "" } {
foreach objfile $files { foreach objfile $files {
if { ![info exists gluefile] || $objfile != $gluefile } { if { ![info exists gluefile] || $objfile != $gluefile } {
eval "remote_file build delete $objfile" eval "file_on_host delete $objfile"
} }
} }
} }
......
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
proc gcc_copy_files {srcfiles dstdir} { proc gcc_copy_files {srcfiles dstdir} {
foreach f $srcfiles { foreach f $srcfiles {
if { [catch { set symlink [file readlink $f] } x] } then { if { [is_remote host] } {
remote_download host $f $dstdir
} elseif { [catch { set symlink [file readlink $f] } x] } then {
file copy -force $f $dstdir file copy -force $f $dstdir
} else { } else {
if { [regexp "^/" "$symlink"] } then { if { [regexp "^/" "$symlink"] } then {
......
...@@ -26,9 +26,9 @@ proc dg-pch { subdir test options suffix } { ...@@ -26,9 +26,9 @@ proc dg-pch { subdir test options suffix } {
set nshort "$subdir/[file tail $test]" set nshort "$subdir/[file tail $test]"
set bname "[file rootname [file tail $nshort]]" set bname "[file rootname [file tail $nshort]]"
catch { file delete "$bname$suffix.gch" } catch { file_on_host delete "$bname$suffix.gch" }
catch { file delete "$bname.s" } catch { file_on_host delete "$bname.s" }
catch { file delete "$bname.s-gch" } catch { file_on_host delete "$bname.s-gch" }
# We don't try to use the loop-optimizing options, since they are highly # We don't try to use the loop-optimizing options, since they are highly
# unlikely to make any difference to PCH. # unlikely to make any difference to PCH.
...@@ -37,23 +37,25 @@ proc dg-pch { subdir test options suffix } { ...@@ -37,23 +37,25 @@ proc dg-pch { subdir test options suffix } {
# For the header files, the default is to precompile. # For the header files, the default is to precompile.
set dg-do-what-default precompile set dg-do-what-default precompile
catch { file delete "$bname$suffix" } catch { file_on_host delete "$bname$suffix" }
gcc_copy_files "[file rootname $test]${suffix}s" "$bname$suffix" gcc_copy_files "[file rootname $test]${suffix}s" "$bname$suffix"
dg-test -keep-output "./$bname$suffix" $flags "" dg-test -keep-output "./$bname$suffix" $flags ""
# For the rest, the default is to compile to .s. # For the rest, the default is to compile to .s.
set dg-do-what-default compile set dg-do-what-default compile
if { [ file exists "$bname$suffix.gch" ] } { if { [ file_on_host exists "$bname$suffix.gch" ] } {
# Ensure that the PCH file is used, not the original header. # Ensure that the PCH file is used, not the original header.
file delete "$bname$suffix" file_on_host delete "$bname$suffix"
dg-test -keep-output $test $flags "-I." dg-test -keep-output $test $flags "-I."
file delete "$bname$suffix.gch" file_on_host delete "$bname$suffix.gch"
if { [ file exists "$bname.s" ] } { if { [ file_on_host exists "$bname.s" ] } {
file rename "$bname.s" "$bname.s-gch" remote_upload host "$bname.s" "$bname.s-gch"
remote_download host "$bname.s-gch"
gcc_copy_files "[file rootname $test]${suffix}s" "$bname$suffix" gcc_copy_files "[file rootname $test]${suffix}s" "$bname$suffix"
dg-test -keep-output $test $flags "-I." dg-test -keep-output $test $flags "-I."
remote_upload host "$bname.s"
set tmp [ diff "$bname.s" "$bname.s-gch" ] set tmp [ diff "$bname.s" "$bname.s-gch" ]
if { $tmp == 0 } { if { $tmp == 0 } {
untested "$nshort $flags assembly comparison" untested "$nshort $flags assembly comparison"
...@@ -62,9 +64,9 @@ proc dg-pch { subdir test options suffix } { ...@@ -62,9 +64,9 @@ proc dg-pch { subdir test options suffix } {
} else { } else {
fail "$nshort $flags assembly comparison" fail "$nshort $flags assembly comparison"
} }
file delete "$bname$suffix" file_on_host delete "$bname$suffix"
file delete "$bname.s" file_on_host delete "$bname.s"
file delete "$bname.s-gch" file_on_host delete "$bname.s-gch"
} else { } else {
untested "$nshort $flags assembly comparison" untested "$nshort $flags assembly comparison"
} }
......
...@@ -44,6 +44,9 @@ proc dg-scan { name positive testcase output_file orig_args } { ...@@ -44,6 +44,9 @@ proc dg-scan { name positive testcase output_file orig_args } {
} }
} }
if { [is_remote host] } {
remote_upload host "$output_file"
}
set fd [open $output_file r] set fd [open $output_file r]
set text [read $fd] set text [read $fd]
close $fd close $fd
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment