pch.exp: Copy test header to the working directory before using it either for...
authorRichard Henderson <rth@redhat.com>
Fri, 17 Jan 2003 07:05:54 +0000 (23:05 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 17 Jan 2003 07:05:54 +0000 (23:05 -0800)
        * g++.dg/pch/pch.exp: Copy test header to the working directory
        before using it either for precompilation or direct use.
        * g++.dg/pch/*.Hs: Rename from gcc.dg/pch/*.H.
        * g++.dg/pch/*.C: Include foo.H, not foo.Hp.

From-SVN: r61428

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pch/empty.C
gcc/testsuite/g++.dg/pch/empty.H [deleted file]
gcc/testsuite/g++.dg/pch/empty.Hs [new file with mode: 0644]
gcc/testsuite/g++.dg/pch/pch.exp
gcc/testsuite/g++.dg/pch/system-1.C
gcc/testsuite/g++.dg/pch/system-1.H [deleted file]
gcc/testsuite/g++.dg/pch/system-1.Hs [new file with mode: 0644]

index c4f00625ae584e9a94eb77491a873b9a14d45796..4a29514debeb0847f97e2d0d61b8e594d776083e 100644 (file)
@@ -1,3 +1,10 @@
+2003-01-16  Richard Henderson  <rth@redhat.com>
+
+       * g++.dg/pch/pch.exp: Copy test header to the working directory
+       before using it either for precompilation or direct use.
+       * g++.dg/pch/*.Hs: Rename from gcc.dg/pch/*.H.
+       * g++.dg/pch/*.C: Include foo.H, not foo.Hp.
+
 2003-01-16  Richard Henderson  <rth@redhat.com>
 
        * gcc.dg/pch/pch.exp: Copy test header to the working directory
index 7aef099f3ef6cf316248d2b22e4777ffa29a15db..92b3cbcdc02f033cb520629492a787ba998b113c 100644 (file)
@@ -1,4 +1,4 @@
-#include "empty.Hp"
+#include "empty.H"
 int main() 
 {
   return 0;
diff --git a/gcc/testsuite/g++.dg/pch/empty.H b/gcc/testsuite/g++.dg/pch/empty.H
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/gcc/testsuite/g++.dg/pch/empty.Hs b/gcc/testsuite/g++.dg/pch/empty.Hs
new file mode 100644 (file)
index 0000000..e69de29
index 8507e355f5387163e9c7b79d2979e7cfb2edacbd..5b495e07a9bcb4b866eb4ca348b3b47d721579a0 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright (C) 1997, 2002 Free Software Foundation, Inc.
+#   Copyright (C) 1997, 2002, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -36,11 +36,10 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.C]] {
     set nshort [file tail [file dirname $test]]/[file tail $test]
     set bname "[file rootname [file tail $test]]"
 
-    catch { file delete "$bname.Hp.pch" }
     catch { file delete "$bname.H.pch" }
+    catch { file delete "$bname.H" }
     catch { file delete "$bname.s" }
     catch { file delete "$bname.s-pch" }
-    catch { file delete "$bname.Hp" }
 
     # We don't try to use the loop-optimizing options, since they are highly
     # unlikely to make any difference to PCH.
@@ -49,30 +48,22 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.C]] {
 
        # For the header files, the default is to precompile.
        set dg-do-what-default precompile
-       dg-test -keep-output "[file rootname $test].H" $flags ""
+       file copy "[file rootname $test].Hs" "$bname.H"
+       dg-test -keep-output "$bname.H" $flags ""
 
        # For the rest, the default is to compile to .s.
        set dg-do-what-default compile
 
        if { [ file exists "$bname.H.pch" ] } {
-           # To ensure that the PCH is used, not the original header,
-           # the actual PCH file is renamed to "<foo>.Hp.pch".
-           file rename "$bname.H.pch" "$bname.Hp.pch"
-           if { [ is_remote host ] } {
-               remote_download host "$bname.Hp.pch"
-           }
+           # Ensure that the PCH file is used, not the original header.
+           file delete "$bname.H"
 
            dg-test -keep-output $test $flags "-I."
-           file delete "$bname.Hp.pch"
+           file delete "$bname.H.pch"
            if { [ file exists "$bname.s" ] } {
                file rename "$bname.s" "$bname.s-pch"
-               if { [ is_remote host ] } {
-                   remote_upload host "[file rootname $test].H" "$bname.Hp"
-               } else {
-                   file copy "[file rootname $test].H" "$bname.Hp"
-               }
+               file copy "[file rootname $test].Hs" "$bname.H"
                dg-test -keep-output $test $flags "-I."
-               remote_file host delete "$bname.Hp"
                set tmp [ diff "$bname.s" "$bname.s-pch" ]
                if { $tmp == 0 } {
                    untested "$nshort $flags assembly comparison"
@@ -81,6 +72,7 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.C]] {
                } else {
                    fail "$nshort $flags assembly comparison"
                }
+               file delete "$bname.H"
                file delete "$bname.s"
                file delete "$bname.s-pch"
            } else {
index a0444bc5941f7fc2c500cfb060dd7bd74a5758b9..72bea3c9a6f1c2208c582c82a147b9ea8c2d685f 100644 (file)
@@ -1,4 +1,4 @@
-#include "system-1.Hp"
+#include "system-1.H"
 
 int main() 
 {
diff --git a/gcc/testsuite/g++.dg/pch/system-1.H b/gcc/testsuite/g++.dg/pch/system-1.H
deleted file mode 100644 (file)
index 604782e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#include <iostream>
diff --git a/gcc/testsuite/g++.dg/pch/system-1.Hs b/gcc/testsuite/g++.dg/pch/system-1.Hs
new file mode 100644 (file)
index 0000000..604782e
--- /dev/null
@@ -0,0 +1 @@
+#include <iostream>