From: Rainer Orth Date: Thu, 13 Dec 2018 14:41:34 +0000 (+0000) Subject: Include gdc.test prefix in test names (PR testsuite/88041) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f1d42e85ad96f0c2977118c019a8a31e895ea1da;p=gcc.git Include gdc.test prefix in test names (PR testsuite/88041) 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d2383831ea8..8957b2121fe 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2018-12-13 Rainer Orth + + 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 PR testsuite/88454 @@ -23,7 +34,7 @@ PR target/88461 * gcc.target/i386/pr88461.c: New test. - + 2018-12-12 Paolo Carlini * g++.dg/other/static5.C: New. diff --git a/gcc/testsuite/gdc.test/compilable/ddoc9676a.d b/gcc/testsuite/gdc.test/compilable/ddoc9676a.d index fc12a6ec62d..326c2cf5325 100644 --- a/gcc/testsuite/gdc.test/compilable/ddoc9676a.d +++ b/gcc/testsuite/gdc.test/compilable/ddoc9676a.d @@ -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 diff --git a/gcc/testsuite/gdc.test/compilable/depsOutput9948.d b/gcc/testsuite/gdc.test/compilable/depsOutput9948.d index 5ba4897a1f5..0876094d4bb 100644 --- a/gcc/testsuite/gdc.test/compilable/depsOutput9948.d +++ b/gcc/testsuite/gdc.test/compilable/depsOutput9948.d @@ -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; diff --git a/gcc/testsuite/gdc.test/gdc-test.exp b/gcc/testsuite/gdc.test/gdc-test.exp index 7dd97d393ea..28f52dac23b 100644 --- a/gcc/testsuite/gdc.test/gdc-test.exp +++ b/gcc/testsuite/gdc.test/gdc-test.exp @@ -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. diff --git a/gcc/testsuite/lib/gdc-dg.exp b/gcc/testsuite/lib/gdc-dg.exp index 67672595ac3..81d404887d8 100644 --- a/gcc/testsuite/lib/gdc-dg.exp +++ b/gcc/testsuite/lib/gdc-dg.exp @@ -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]