Include gdc.test prefix in test names (PR testsuite/88041)
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 13 Dec 2018 14:41:34 +0000 (14:41 +0000)
committerRainer Orth <ro@gcc.gnu.org>
Thu, 13 Dec 2018 14:41:34 +0000 (14:41 +0000)
PR testsuite/88041
* lib/gdc-dg.exp (gdc-dg-test): Strip gdc.test prefix.
* gdc.test/gdc-test.exp (gdc-do-test): Create $subdir link.
Include $subdir in filename.
Cleanup generated source.
* gdc.test/compilable/ddoc9676a.d (EXTRA_SOURCES): Don't use
absolute path.
* gdc.test/compilable/depsOutput9948.d: Likewise.

From-SVN: r267094

gcc/testsuite/ChangeLog
gcc/testsuite/gdc.test/compilable/ddoc9676a.d
gcc/testsuite/gdc.test/compilable/depsOutput9948.d
gcc/testsuite/gdc.test/gdc-test.exp
gcc/testsuite/lib/gdc-dg.exp

index d2383831ea812cf8fde59d5e03b1ca13c5d800b6..8957b2121fe986423638c24a8bb0c6ff16147149 100644 (file)
@@ -1,3 +1,14 @@
+2018-12-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR testsuite/88041
+       * lib/gdc-dg.exp (gdc-dg-test): Strip gdc.test prefix.
+       * gdc.test/gdc-test.exp (gdc-do-test): Create $subdir link.
+       Include $subdir in filename.
+       Cleanup generated source.
+       * gdc.test/compilable/ddoc9676a.d (EXTRA_SOURCES): Don't use
+       absolute path.
+       * gdc.test/compilable/depsOutput9948.d: Likewise.
+
 2018-12-13  Jakub Jelinek  <jakub@redhat.com>
 
        PR testsuite/88454
@@ -23,7 +34,7 @@
 
        PR target/88461
        * gcc.target/i386/pr88461.c: New test.
-       
+
 2018-12-12  Paolo Carlini  <paolo.carlini@oracle.com>
 
        * g++.dg/other/static5.C: New.
index fc12a6ec62df9a9a4cad5b2f36f9c9e191cf1d9f..326c2cf5325f04db12209acf2d6d9ae25d53c98f 100644 (file)
@@ -1,5 +1,5 @@
 // PERMUTE_ARGS:
-// EXTRA_SOURCES: /extra-files/ddoc9676a.ddoc
+// EXTRA_SOURCES: extra-files/ddoc9676a.ddoc
 // REQUIRED_ARGS: -D -Dd${RESULTS_DIR}/compilable -o-
 // POST_SCRIPT: compilable/extra-files/ddocAny-postscript.sh 9676a
 
index 5ba4897a1f566f1b43d9ded05f96dc908796d599..0876094d4bbf535c2c7c3222b4b693eb8ae038c8 100644 (file)
@@ -1,7 +1,7 @@
 // PERMUTE_ARGS:
 // REQUIRED_ARGS: -deps=${RESULTS_DIR}/compilable/depsOutput9948.deps
 // POST_SCRIPT: compilable/extra-files/depsOutput.sh 
-// EXTRA_SOURCES: /extra-files/depsOutput9948a.d
+// EXTRA_SOURCES: extra-files/depsOutput9948a.d
 
 module depsOutput9948;
 import depsOutput9948a;
index 7dd97d393ea0911e9666d3d338004f7773efaff1..28f52dac23bc903bdeb880ed661c527928d1ecc3 100644 (file)
@@ -360,6 +360,9 @@ proc gdc-do-test { } {
     # Initialize `dg'.
     dg-init
 
+    # Create gdc.test link so test names include that subdir.
+    catch { file link $subdir . }
+
     # Main loop.
 
     # set verbose 1
@@ -380,7 +383,8 @@ proc gdc-do-test { } {
 
         # Convert to DG test.
         set imports [format "-I%s/%s" $base $dir]
-        set filename [dmd2dg $base $dir/$name.$ext]
+        # Include $subdir prefix so test names follow DejaGnu conventions.
+        set filename "$subdir/[dmd2dg $base $dir/$name.$ext]"
 
         if { $dir == "runnable" } {
             append PERMUTE_ARGS " $SHARED_OPTION"
@@ -423,7 +427,7 @@ proc gdc-do-test { } {
         }
 
         # Cleanup
-        #file delete $filename
+        file delete $filename
     }
 
     # All done.
index 67672595ac361d354848d62f2e96a3fc7003dcc5..81d404887d82640e547774719b8d2e8e4d10701e 100644 (file)
@@ -32,6 +32,10 @@ proc gdc-dg-test { prog do_what extra_tool_flags } {
        }
     }
 
+    # Strip gdc.test prefix off test names to avoid pathname failures in
+    # some tests.
+    set prog [dg-trim-dirname gdc.test $prog]
+
     set result \
         [gcc-dg-test-1 gdc_target_compile $prog $do_what $extra_tool_flags]