aboutsummaryrefslogtreecommitdiff
path: root/libphobos/testsuite
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
committerIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
commite252b51ccde010cbd2a146485d8045103cd99533 (patch)
treee060f101cdc32bf5e520de8e5275db9d4236b74c /libphobos/testsuite
parentf10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff)
parent104c05c5284b7822d770ee51a7d91946c7e56d50 (diff)
downloadgcc-e252b51ccde010cbd2a146485d8045103cd99533.zip
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'libphobos/testsuite')
-rw-r--r--libphobos/testsuite/Makefile.in4
-rw-r--r--libphobos/testsuite/libphobos.druntime/druntime.exp5
-rw-r--r--libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp2
-rw-r--r--libphobos/testsuite/libphobos.exceptions/chain.d4
-rw-r--r--libphobos/testsuite/libphobos.exceptions/line_trace.d2
-rw-r--r--libphobos/testsuite/libphobos.phobos/phobos.exp5
-rw-r--r--libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp2
-rw-r--r--libphobos/testsuite/libphobos.thread/fiber_guard_page.d6
-rwxr-xr-xlibphobos/testsuite/testsuite_flags.in3
9 files changed, 21 insertions, 12 deletions
diff --git a/libphobos/testsuite/Makefile.in b/libphobos/testsuite/Makefile.in
index c38a468..8855480 100644
--- a/libphobos/testsuite/Makefile.in
+++ b/libphobos/testsuite/Makefile.in
@@ -215,6 +215,7 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
+SECTION_FLAGS = @SECTION_FLAGS@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
@@ -242,6 +243,8 @@ datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
exec_prefix = @exec_prefix@
gcc_version = @gcc_version@
gdc_include_dir = @gdc_include_dir@
@@ -271,6 +274,7 @@ oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
phobos_compiler_pic_flag = @phobos_compiler_pic_flag@
phobos_compiler_shared_flag = @phobos_compiler_shared_flag@
+phobos_lt_pic_flag = @phobos_lt_pic_flag@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
diff --git a/libphobos/testsuite/libphobos.druntime/druntime.exp b/libphobos/testsuite/libphobos.druntime/druntime.exp
index 2f3a36f..daedfd7 100644
--- a/libphobos/testsuite/libphobos.druntime/druntime.exp
+++ b/libphobos/testsuite/libphobos.druntime/druntime.exp
@@ -15,7 +15,7 @@
# <http://www.gnu.org/licenses/>.
# Immediately exit if we can't run target executables.
-if { ![isnative] || ![is-effective-target static] } {
+if { ![isnative] } {
return
}
@@ -34,7 +34,8 @@ dg-init
# Main loop.
foreach test $tests {
set libphobos_test_name "$subdir/[dg-trim-dirname $srcdir/../libdruntime $test]"
- dg-runtest $test "" "-fmain -fbuilding-libphobos-tests $version_flags"
+ dg-runtest $test "-static-libphobos" \
+ "-fmain -fbuilding-libphobos-tests $version_flags"
set libphobos_test_name ""
}
diff --git a/libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp b/libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp
index 6ca62a3..51f9c2c 100644
--- a/libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp
+++ b/libphobos/testsuite/libphobos.druntime_shared/druntime_shared.exp
@@ -34,7 +34,7 @@ dg-init
# Main loop.
foreach test $tests {
set libphobos_test_name "$subdir/[dg-trim-dirname $srcdir/../libdruntime $test]"
- dg-runtest $test "-fversion=Shared -shared-libphobos" \
+ dg-runtest $test "-shared-libphobos" \
"-fmain -fbuilding-libphobos-tests -fno-moduleinfo $version_flags"
set libphobos_test_name ""
}
diff --git a/libphobos/testsuite/libphobos.exceptions/chain.d b/libphobos/testsuite/libphobos.exceptions/chain.d
index 462ba24..0305707 100644
--- a/libphobos/testsuite/libphobos.exceptions/chain.d
+++ b/libphobos/testsuite/libphobos.exceptions/chain.d
@@ -65,14 +65,14 @@ void main()
string prefix = "";
for ({ size_t i; Throwable ex = original; } ex; ex = ex.next, ++i)
{
- printf("%.*s%.*s\n", prefix.length, prefix.ptr, ex.msg.length, ex.msg.ptr);
+ printf("%.*s%.*s\n", cast(int)prefix.length, prefix.ptr, cast(int)ex.msg.length, ex.msg.ptr);
prefix = prefix~" ";
}
printf("Bypassed chain was:\n");
prefix = "";
for ({ size_t i; Throwable ex = original.bypassedException; } ex; ex = ex.next, ++i)
{
- printf("%.*s%.*s\n", prefix.length, prefix.ptr, ex.msg.length, ex.msg.ptr);
+ printf("%.*s%.*s\n", cast(int)prefix.length, prefix.ptr, cast(int)ex.msg.length, ex.msg.ptr);
prefix = prefix~" ";
}
}
diff --git a/libphobos/testsuite/libphobos.exceptions/line_trace.d b/libphobos/testsuite/libphobos.exceptions/line_trace.d
index 7b75d3a..70762ff 100644
--- a/libphobos/testsuite/libphobos.exceptions/line_trace.d
+++ b/libphobos/testsuite/libphobos.exceptions/line_trace.d
@@ -9,7 +9,7 @@ void main()
{
import core.stdc.stdio;
auto str = e.toString();
- printf("%.*s\n", str.length, str.ptr);
+ printf("%.*s\n", cast(int)str.length, str.ptr);
}
}
diff --git a/libphobos/testsuite/libphobos.phobos/phobos.exp b/libphobos/testsuite/libphobos.phobos/phobos.exp
index 0975ab1..937849e 100644
--- a/libphobos/testsuite/libphobos.phobos/phobos.exp
+++ b/libphobos/testsuite/libphobos.phobos/phobos.exp
@@ -15,7 +15,7 @@
# <http://www.gnu.org/licenses/>.
# Immediately exit if we can't run target executables.
-if { ![isnative] || ![is-effective-target static] } {
+if { ![isnative] } {
return
}
@@ -45,7 +45,8 @@ dg-init
# Main loop.
foreach test $tests {
set libphobos_test_name "$subdir/[dg-trim-dirname $srcdir/../src $test]"
- dg-runtest $test "" "-fmain -fbuilding-libphobos-tests $version_flags"
+ dg-runtest $test "-static-libphobos" \
+ "-fmain -fbuilding-libphobos-tests $version_flags"
set libphobos_test_name ""
}
diff --git a/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp b/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp
index da31304..8498522 100644
--- a/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp
+++ b/libphobos/testsuite/libphobos.phobos_shared/phobos_shared.exp
@@ -45,7 +45,7 @@ dg-init
# Main loop.
foreach test $tests {
set libphobos_test_name "$subdir/[dg-trim-dirname $srcdir/../src $test]"
- dg-runtest $test "-fversion=Shared -shared-libphobos" \
+ dg-runtest $test "-shared-libphobos" \
"-fmain -fbuilding-libphobos-tests -fno-moduleinfo $version_flags"
set libphobos_test_name ""
}
diff --git a/libphobos/testsuite/libphobos.thread/fiber_guard_page.d b/libphobos/testsuite/libphobos.thread/fiber_guard_page.d
index 9f754e1..ca54a19 100644
--- a/libphobos/testsuite/libphobos.thread/fiber_guard_page.d
+++ b/libphobos/testsuite/libphobos.thread/fiber_guard_page.d
@@ -1,13 +1,15 @@
// { dg-options "-O0" }
// { dg-shouldfail "segv or bus error" }
import core.thread;
+import core.sys.posix.signal;
import core.sys.posix.sys.mman;
// this should be true for most architectures
// (taken from core.thread)
-version = StackGrowsDown;
+version (GNU_StackGrowsDown)
+ version = StackGrowsDown;
-enum stackSize = 4096;
+enum stackSize = MINSIGSTKSZ;
// Simple method that causes a stack overflow
void stackMethod()
diff --git a/libphobos/testsuite/testsuite_flags.in b/libphobos/testsuite/testsuite_flags.in
index 6a2d79f..bafd5ad4 100755
--- a/libphobos/testsuite/testsuite_flags.in
+++ b/libphobos/testsuite/testsuite_flags.in
@@ -28,7 +28,8 @@ case ${query} in
;;
--gdcflags)
GDCFLAGS_default="-fmessage-length=0 -fno-show-column"
- GDCFLAGS_config="@WARN_DFLAGS@ @GDCFLAGS@ @CET_DFLAGS@ -fno-release -funittest"
+ GDCFLAGS_config="@WARN_DFLAGS@ @GDCFLAGS@ @CET_DFLAGS@
+ @phobos_compiler_shared_flag@ -fno-release -funittest"
echo ${GDCFLAGS_default} ${GDCFLAGS_config}
;;
--gdcpaths)