PATCH: Fix objc test
H . J . Lu
hjl@lucon.org
Sun Jan 6 21:33:00 GMT 2002
I got
Executing on host: /export/build/gnu/gcc/build-i686-linux/gcc/xgcc -B/export/build/gnu/gcc/build-i686-linux/gcc/ -L/export/build/gnu/gcc/build-i686-linux/i686-pc-linux-gnu/libobjc/.libs -c -o unclaimed-category-1a.o /home/hjl/work/gnu/src/gcc/gcc/gcc/testsuite/objc.dg/special/unclaimed-category-1a.m (timeout = 300)
/home/hjl/work/gnu/src/gcc/gcc/gcc/testsuite/objc.dg/special/unclaimed-category-1a.m:2:23: objc/objc.h: No such file or directory^M
/home/hjl/work/gnu/src/gcc/gcc/gcc/testsuite/objc.dg/special/unclaimed-category-1a.m:3:25: objc/Object.h: No such file or directory^M
In file included from
/home/hjl/work/gnu/src/gcc/gcc/gcc/testsuite/objc.dg/special/unclaimed-category-1a.m:8:^M
/home/hjl/work/gnu/src/gcc/gcc/gcc/testsuite/objc.dg/special/unclaimed-category-1.h:2:23: objc/objc.h: No such file or directory^M
/home/hjl/work/gnu/src/gcc/gcc/gcc/testsuite/objc.dg/special/unclaimed-category-1.h:3:25: objc/Object.h: No such file or directory^M
The problem is the testcase assumes the objc header files are installed
which is not always true. The following patch fixes it. If I don't hear
any objections by tomorrow, I will check it in as an obvious fix.
Thanks.
H.J.
----
2002-01-06 H.J. Lu <hjl@gnu.org>
* objc.dg/special/special.exp: Add -I${srcdir}/../../libobjc
for header files.
--- objc.dg/special/special.exp.hdr Mon Dec 17 09:27:08 2001
+++ objc.dg/special/special.exp Sun Jan 6 20:36:02 2002
@@ -33,11 +33,11 @@ dg-init
# This test is special because we must compile two different modules,
# unclaimed-category-1a.m and unclaimed-category-1.m, then link
# together, then run the resulting executable.
-set lines [objc_target_compile "$srcdir/$subdir/unclaimed-category-1a.m" "unclaimed-category-1a.o" object ""]
+set lines [objc_target_compile "$srcdir/$subdir/unclaimed-category-1a.m" "unclaimed-category-1a.o" object "additional_flags=-I${srcdir}/../../libobjc"]
if ![string match "" $lines] then {
fail "unclaimed-category-1a.o"
} else {
- dg-runtest "$srcdir/$subdir/unclaimed-category-1.m" "unclaimed-category-1a.o" ""
+ dg-runtest "$srcdir/$subdir/unclaimed-category-1.m" "unclaimed-category-1a.o" "-I${srcdir}/../../libobjc"
file delete unclaimed-category-1a.o
}
More information about the Gcc-patches
mailing list