testsuite/gdc.test: Merge upstream dmd 5dd3eccc3
The D2 testsuite script has been updated to handle EXTRA_SOURCES and EXTRA_FILES settings being split across multiple lines, which is how they appear in upstream. Reviewed-on: https://github.com/dlang/dmd/pull/9517 gcc/testsuite/ChangeLog: 2019-03-30 Iain Buclaw <ibuclaw@gdcproject.org> * gdc.test/gdc-test.exp (gdc-copy-extra): Append copied files to cleanup_extra_files. (dmd2dg): Copy additional files after test is processed. (gdc-do-test): Remove all copied files after test. From-SVN: r270038
This commit is contained in:
parent
0324a4978e
commit
1821f97bb4
|
@ -1,4 +1,4 @@
|
|||
ab702e73e56aefb3b77b8f8f42da94bc22143eeb
|
||||
5dd3eccc3b0758346f77bee3cdc3f6bd15de339b
|
||||
|
||||
The first line of this file holds the git revision number of the last
|
||||
merge done from the dlang/dmd repository.
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2019-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
|
||||
|
||||
* gdc.test/gdc-test.exp (gdc-copy-extra): Append copied files to
|
||||
cleanup_extra_files.
|
||||
(dmd2dg): Copy additional files after test is translated.
|
||||
(gdc-do-test): Remove all copied files after test.
|
||||
|
||||
2019-03-30 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/89841
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// REQUIRED_ARGS: -c -Icompilable/extra-files
|
||||
// REQUIRED_ARGS: -Icompilable/extra-files
|
||||
// EXTRA_SOURCES: b6395.d
|
||||
// EXTRA_FILES: extra-files/c6395.d
|
||||
|
||||
// 6395
|
||||
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
// PERMUTE_ARGS:
|
||||
// REQUIRED_ARGS: -Icompilable/extra-files
|
||||
// EXTRA_FILES: extra-files/example7190/controllers/HomeController.d extra-files/example7190/models/HomeModel.d extra-files/serenity7190/core/Controller.d extra-files/serenity7190/core/Model.d
|
||||
// EXTRA_FILES: extra-files/example7190/controllers/HomeController.d
|
||||
// EXTRA_FILES: extra-files/example7190/models/HomeModel.d
|
||||
// EXTRA_FILES: extra-files/serenity7190/core/Controller.d
|
||||
// EXTRA_FILES: extra-files/serenity7190/core/Model.d
|
||||
|
||||
import example7190.controllers.HomeController;
|
||||
import example7190.models.HomeModel;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
// REQUIRED_ARGS: -c
|
||||
// EXTRA_SOURCES: imports/test9436interp.d
|
||||
|
||||
// this is a dummy module for test 9436.
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
// PERMUTE_ARGS:
|
||||
// REQUIRED_ARGS: -Icompilable/extra-files
|
||||
// EXTRA_FILES: extra-files/pkgDIP37/datetime/package.d extra-files/pkgDIP37/datetime/common.d extra-files/pkgDIP37/test17629/package.di extra-files/pkgDIP37/test17629/common.di
|
||||
// EXTRA_FILES: extra-files/pkgDIP37/datetime/package.d
|
||||
// EXTRA_FILES: extra-files/pkgDIP37/datetime/common.d
|
||||
// EXTRA_FILES: extra-files/pkgDIP37/test17629/package.di
|
||||
// EXTRA_FILES: extra-files/pkgDIP37/test17629/common.di
|
||||
|
||||
void test1()
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// PERMUTE_ARGS:
|
||||
// REQUIRED_ARGS: -c -Icompilable/extra-files
|
||||
// EXTRA_SOURCES: extra-files/pkgDIP37_10302/liba.d extra-files/pkgDIP37_10302/libb.d
|
||||
// REQUIRED_ARGS: -Icompilable/extra-files
|
||||
// COMPILED_IMPORTS: extra-files/pkgDIP37_10302/liba.d
|
||||
// COMPILED_IMPORTS: extra-files/pkgDIP37_10302/libb.d
|
||||
// EXTRA_FILES: extra-files/pkgDIP37_10302/package.d
|
||||
|
||||
module test;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// PERMUTE_ARGS:
|
||||
// REQUIRED_ARGS: -o- -Icompilable/extra-files
|
||||
// EXTRA_FILES: extra-files/pkgDIP37_10354/mbar.d extra-files/pkgDIP37_10354/mfoo.d extra-files/pkgDIP37_10354/package.d
|
||||
// EXTRA_FILES: extra-files/pkgDIP37_10354/mbar.d
|
||||
// EXTRA_FILES: extra-files/pkgDIP37_10354/mfoo.d
|
||||
// EXTRA_FILES: extra-files/pkgDIP37_10354/package.d
|
||||
|
||||
module testDIP37_10354;
|
||||
import pkgDIP37_10354.mfoo;
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// PERMUTE_ARGS:
|
||||
// REQUIRED_ARGS: -Icompilable/extra-files
|
||||
// COMPILED_IMPORTS: extra-files/pkgDIP37_10421/algo/package.d extra-files/pkgDIP37_10421/algo/mod.d extra-files/pkgDIP37_10421/except.d
|
||||
// COMPILED_IMPORTS: extra-files/pkgDIP37_10421/algo/package.d
|
||||
// COMPILED_IMPORTS: extra-files/pkgDIP37_10421/algo/mod.d
|
||||
// COMPILED_IMPORTS: extra-files/pkgDIP37_10421/except.d
|
||||
|
||||
module testDIP37_10421;
|
||||
import pkgDIP37_10421.algo;
|
||||
|
|
|
@ -153,6 +153,10 @@ proc gdc-copy-extra { base extra } {
|
|||
close $fdin
|
||||
close $fdout
|
||||
|
||||
# Remove file once test is finished.
|
||||
upvar 2 cleanup_extra_files cleanups
|
||||
lappend cleanups $extra
|
||||
|
||||
return $extra
|
||||
}
|
||||
|
||||
|
@ -184,6 +188,9 @@ proc dmd2dg { base test } {
|
|||
set PERMUTE_ARGS $DEFAULT_DFLAGS
|
||||
set GDC_EXECUTE_ARGS ""
|
||||
|
||||
set extra_sources ""
|
||||
set extra_files ""
|
||||
|
||||
# Split base, folder/file.
|
||||
set type [file dirname $test]
|
||||
set name [file tail $test]
|
||||
|
@ -230,46 +237,57 @@ proc dmd2dg { base test } {
|
|||
regsub -- {REQUIRED_ARGS.*$} $copy_line $new_option out_line
|
||||
|
||||
} elseif [regexp -- {EXTRA_SOURCES\s*:\s*(.*)} $copy_line match sources] {
|
||||
# Copy all sources to the testsuite build directory.
|
||||
foreach import $sources {
|
||||
# print "Import: $base $type/$import"
|
||||
gdc-copy-extra $base "$type/$import"
|
||||
# EXTRA_SOURCES are appended to extra_sources list
|
||||
foreach srcfile $sources {
|
||||
lappend extra_sources $srcfile
|
||||
}
|
||||
set new_option "{ dg-additional-sources \"$sources\" }"
|
||||
regsub -- {EXTRA_SOURCES.*$} $copy_line $new_option out_line
|
||||
regsub -- {EXTRA_SOURCES.*$} $copy_line "" out_line
|
||||
|
||||
} elseif [regexp -- {EXTRA_CPP_SOURCES\s*:\s*(.*)} $copy_line match sources] {
|
||||
# Copy all sources to the testsuite build directory.
|
||||
foreach import $sources {
|
||||
# print "Import: $base $type/$import"
|
||||
gdc-copy-extra $base "$type/$import"
|
||||
# EXTRA_CPP_SOURCES are appended to extra_sources list
|
||||
foreach srcfile $sources {
|
||||
# C++ sources are found in the extra-files directory.
|
||||
lappend extra_sources "extra-files/$srcfile"
|
||||
}
|
||||
set new_option "{ dg-additional-sources \"$sources\" }"
|
||||
regsub -- {EXTRA_CPP_SOURCES.*$} $copy_line $new_option out_line
|
||||
regsub -- {EXTRA_CPP_SOURCES.*$} $copy_line "" out_line
|
||||
|
||||
} elseif [regexp -- {EXTRA_FILES\s*:\s*(.*)} $copy_line match files] {
|
||||
# Copy all files to the testsuite build directory.
|
||||
foreach import $files {
|
||||
# print "Import: $base $type/$import"
|
||||
gdc-copy-extra $base "$type/$import"
|
||||
# EXTRA_FILES are appended to extra_files list
|
||||
foreach file $files {
|
||||
lappend extra_files $file
|
||||
}
|
||||
set new_option "{ dg-additional-files \"$files\" }"
|
||||
regsub -- {EXTRA_FILES.*$} $copy_line $new_option out_line
|
||||
regsub -- {EXTRA_FILES.*$} $copy_line "" out_line
|
||||
|
||||
} elseif [regexp -- {COMPILED_IMPORTS\s*:\s*(.*)} $copy_line match sources] {
|
||||
# Copy all sources to the testsuite build directory.
|
||||
# COMPILED_IMPORTS are appended to extra_sources list
|
||||
foreach import $sources {
|
||||
# print "Import: $base $type/$import"
|
||||
gdc-copy-extra $base "$type/$import"
|
||||
lappend extra_sources $import
|
||||
}
|
||||
set new_option "{ dg-additional-sources \"$sources\" }"
|
||||
regsub -- {COMPILED_IMPORTS.*$} $copy_line $new_option out_line
|
||||
regsub -- {COMPILED_IMPORTS.*$} $copy_line "" out_line
|
||||
|
||||
}
|
||||
|
||||
puts $fdout $out_line
|
||||
}
|
||||
|
||||
# Now that all extra sources and files have been collected, copy them all
|
||||
# to the testsuite build directory.
|
||||
if { [llength $extra_sources] > 0 } {
|
||||
foreach srcfile $extra_sources {
|
||||
gdc-copy-extra $base "$type/$srcfile"
|
||||
}
|
||||
set out_line "// { dg-additional-sources \"$extra_sources\" }"
|
||||
puts $fdout $out_line
|
||||
}
|
||||
|
||||
if { [llength $extra_files] > 0 } {
|
||||
foreach file $extra_files {
|
||||
gdc-copy-extra $base "$type/$file"
|
||||
}
|
||||
set out_line "// { dg-additional-files \"$extra_files\" }"
|
||||
puts $fdout $out_line
|
||||
}
|
||||
|
||||
# Add specific options for test type
|
||||
|
||||
# DMD's testsuite is extremely verbose, compiler messages from constructs
|
||||
|
@ -387,6 +405,7 @@ proc gdc-do-test { } {
|
|||
|
||||
# Convert to DG test.
|
||||
set imports [format "-I%s/%s" $base $dir]
|
||||
set cleanup_extra_files ""
|
||||
# Include $subdir prefix so test names follow DejaGnu conventions.
|
||||
set filename "$subdir/[dmd2dg $base $dir/$name.$ext]"
|
||||
|
||||
|
@ -430,7 +449,10 @@ proc gdc-do-test { } {
|
|||
}
|
||||
}
|
||||
|
||||
# Cleanup
|
||||
# Cleanup test directory.
|
||||
foreach srcfile $cleanup_extra_files {
|
||||
file delete $subdir/$srcfile
|
||||
}
|
||||
file delete $filename
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
// EXTRA_CPP_SOURCES: extra-files/cabi2.cpp
|
||||
// EXTRA_CPP_SOURCES: cabi2.cpp
|
||||
|
||||
import core.stdc.stdio;
|
||||
import core.stdc.config;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// EXTRA_CPP_SOURCES: extra-files/cpp_abi_tests.cpp
|
||||
// EXTRA_CPP_SOURCES: cpp_abi_tests.cpp
|
||||
|
||||
extern(C++) {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// PERMUTE_ARGS: -g
|
||||
// EXTRA_CPP_SOURCES: extra-files/cppb.cpp
|
||||
// EXTRA_CPP_SOURCES: cppb.cpp
|
||||
|
||||
import core.stdc.stdio;
|
||||
import core.stdc.stdarg;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// EXTRA_CPP_SOURCES: extra-files/externmangle.cpp
|
||||
// EXTRA_CPP_SOURCES: externmangle.cpp
|
||||
|
||||
extern(C++):
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// EXTRA_CPP_SOURCES: extra-files/externmangle2.cpp
|
||||
// EXTRA_CPP_SOURCES: externmangle2.cpp
|
||||
|
||||
version(Windows)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// EXTRA_SOURCES: imports/ice10086x.d imports/ice10086y.d
|
||||
// EXTRA_SOURCES: imports/ice10086x.d
|
||||
// EXTRA_SOURCES: imports/ice10086y.d
|
||||
|
||||
import imports.ice10086x;
|
||||
import imports.ice10086y;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// EXTRA_SOURCES: imports/ice10086y.d imports/ice10086x.d
|
||||
// EXTRA_SOURCES: imports/ice10086y.d
|
||||
// EXTRA_SOURCES: imports/ice10086x.d
|
||||
|
||||
import imports.ice10086y;
|
||||
import imports.ice10086x;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// EXTRA_SOURCES: imports/ice4481a.d imports/ice4481b.d
|
||||
// EXTRA_SOURCES: imports/ice4481a.d
|
||||
// EXTRA_SOURCES: imports/ice4481b.d
|
||||
|
||||
import imports.ice4481a;
|
||||
import imports.ice4481b;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
module imports.std12010container;
|
||||
struct Array(T)
|
||||
{
|
||||
private struct Payload
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// COMPILE_SEPARATELY
|
||||
// EXTRA_SOURCES: imports/link11069x.d imports/link11069y.d imports/link11069z.d
|
||||
// EXTRA_SOURCES: imports/link11069x.d
|
||||
// EXTRA_SOURCES: imports/link11069y.d
|
||||
// EXTRA_SOURCES: imports/link11069z.d
|
||||
|
||||
import imports.link11069y;
|
||||
import imports.link11069z;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// COMPILE_SEPARATELY
|
||||
// EXTRA_SOURCES: imports/a12010.d imports/std12010container.d
|
||||
// EXTRA_SOURCES: imports/a12010.d
|
||||
// EXTRA_FILES: imports/std12010container.d
|
||||
// REQUIRED_ARGS: -release
|
||||
// -release is necessary to avoid __assert.
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// PERMUTE_ARGS: -version=X -inline -release -g -O
|
||||
// EXTRA_SOURCES: imports/link2644a.d imports/link2644b.d imports/link2644c.d
|
||||
// EXTRA_SOURCES: imports/link2644a.d
|
||||
// EXTRA_SOURCES: imports/link2644b.d
|
||||
// EXTRA_SOURCES: imports/link2644c.d
|
||||
// COMPILE_SEPARATELY:
|
||||
|
||||
module link2644;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// EXTRA_SOURCES: imports/ovs1528a.d imports/ovs1528b.d imports/template_ovs1.d imports/template_ovs2.d imports/template_ovs3.d
|
||||
// EXTRA_SOURCES: imports/ovs1528a.d imports/ovs1528b.d
|
||||
// EXTRA_SOURCES: imports/template_ovs1.d imports/template_ovs2.d imports/template_ovs3.d
|
||||
|
||||
import imports.template_ovs1;
|
||||
import imports.template_ovs2;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// EXTRA_SOURCES: imports/test10736a.d imports/test10736b.d
|
||||
// EXTRA_SOURCES: imports/test10736a.d
|
||||
// EXTRA_SOURCES: imports/test10736b.d
|
||||
|
||||
import imports.test10736a;
|
||||
import imports.test10736b;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// COMPILE_SEPARATELY
|
||||
// EXTRA_SOURCES: imports/std11863conv.d imports/std11863format.d
|
||||
// EXTRA_SOURCES: imports/std11863conv.d
|
||||
// EXTRA_FILES: imports/std11863format.d
|
||||
|
||||
import imports.std11863conv;
|
||||
|
||||
|
|
|
@ -5676,7 +5676,11 @@ void testreal_to_ulong()
|
|||
real adjust = 1.0L/real.epsilon;
|
||||
u = r2ulong(adjust);
|
||||
//writefln("%s %s", adjust, u);
|
||||
static if(real.mant_dig == 64)
|
||||
static if(real.mant_dig == 113)
|
||||
assert(u == 18446744073709551615UL);
|
||||
else static if(real.mant_dig == 106)
|
||||
assert(u == 18446744073709551615UL);
|
||||
else static if(real.mant_dig == 64)
|
||||
assert(u == 9223372036854775808UL);
|
||||
else static if(real.mant_dig == 53)
|
||||
assert(u == 4503599627370496UL);
|
||||
|
|
Loading…
Reference in New Issue