re PR testsuite/21164 (libjava tests uses absolute paths)

libjava:
	PR testsuite/21164
	* testsuite/lib/libjava.exp: Load dg.exp.
	* testsuite/libjava.jar/jar.exp (gcj_jar_interpret): Strip srcdir
	from jarfile.
	Use result for messages.
	* testsuite/libjava.loader/loader.exp (gcj_loader_test_one): Pass
	errname to libjava_invoke, fix testname.

	gcc:
	PR testsuite/21164
	* lib/compat.exp (compat-execute): Declare unsupported after
	stripping path from src1.
	* lib/lto.exp (lto-execute): Likewise.

From-SVN: r172302
This commit is contained in:
Rainer Orth
2011-04-12 09:04:05 +00:00
committed by Rainer Orth
parent e30ecc5d62
commit c9c0db83bb
7 changed files with 49 additions and 29 deletions
+4 -3
View File
@@ -20,17 +20,18 @@ proc gcj_jar_interpret {jarfile} {
global INTERPRETER srcdir
set gij [libjava_find_gij]
set errname [dg-trim-dirname $srcdir $jarfile]
# libjava_find_gij will return "" if it couldn't find the
# program; in this case we want to skip the test.
if {$INTERPRETER != "yes" || $gij == ""} {
untested "$jarfile execution - gij test"
untested "$jarfile output - gij test"
untested "$errname execution - gij test"
untested "$errname output - gij test"
return
}
set opts(_) {}
set out [file rootname $jarfile].out
libjava_invoke $jarfile "gij test" opts $gij {} $out \
libjava_invoke $errname "gij test" opts $gij {} $out \
"" -jar $jarfile
}