summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am1
-rwxr-xr-xbuild_w32.bat1
-rw-r--r--tests/config-flags.pm.W329
-rw-r--r--tests/run_make_tests.pl8
-rw-r--r--tests/scripts/features/archives7
-rw-r--r--tests/scripts/features/load9
-rw-r--r--tests/scripts/features/loadapi9
-rw-r--r--tests/scripts/functions/wildcard2
8 files changed, 32 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am
index 10e04c84..30b6ee27 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -94,6 +94,7 @@ m4_FILES = m4/gnulib-cache.m4
test_FILES = tests/run_make_tests tests/run_make_tests.bat \
tests/run_make_tests.pl tests/test_driver.pl \
tests/config-flags.pm.in tests/config_flags_pm.com \
+ tests/config-flags.pm.W32 \
tests/mkshadow tests/jhelp.pl tests/guile.supp tests/README
# test/scripts are added via dist-hook below.
diff --git a/build_w32.bat b/build_w32.bat
index 9fbfb4bb..b245d053 100755
--- a/build_w32.bat
+++ b/build_w32.bat
@@ -258,6 +258,7 @@ exit 1
:Success
echo %OUTDIR% build succeeded.
if exist Basic.mk copy /Y Basic.mk Makefile
+if not exist tests\config-flags.pm copy /Y tests\config-flags.pm.W32 tests\config-flags.pm
call :Reset
goto :EOF
diff --git a/tests/config-flags.pm.W32 b/tests/config-flags.pm.W32
new file mode 100644
index 00000000..9d2602bb
--- /dev/null
+++ b/tests/config-flags.pm.W32
@@ -0,0 +1,9 @@
+# This is a -*-perl-*- script
+#
+# Set variables for Windows systems.
+
+%CONFIG_FLAGS = (
+ USE_SYSTEM_GLOB => 'no'
+);
+
+1;
diff --git a/tests/run_make_tests.pl b/tests/run_make_tests.pl
index a7a55558..16a0e3ff 100644
--- a/tests/run_make_tests.pl
+++ b/tests/run_make_tests.pl
@@ -483,10 +483,14 @@ sub find_prog
return ($v, $d, $f);
}
+sub get_config
+{
+ return exists($CONFIG_FLAGS{$_[0]}) ? $CONFIG_FLAGS{$_[0]} : '';
+}
+
sub set_more_defaults
{
- local($string);
- local($index);
+ my $string;
# Now that we have located make_path, locate the srcdir and blddir
my ($mpv, $mpd, $mpf) = find_prog($make_path);
diff --git a/tests/scripts/features/archives b/tests/scripts/features/archives
index beceb46c..dcd38e5a 100644
--- a/tests/scripts/features/archives
+++ b/tests/scripts/features/archives
@@ -29,11 +29,8 @@ if ($osname eq 'VMS') {
utouch(-60, qw(a1.o a2.o a3.o));
}
-my $ar = $CONFIG_FLAGS{AR};
-
-# Fallback if configure did not find AR, such as VMS
-# which does not run configure.
-$ar = 'ar' if $ar eq '';
+# Fallback if configure did not find AR
+my $ar = get_config('AR') || 'ar';
my $redir = '2>&1';
$redir = '' if $osname eq 'VMS';
diff --git a/tests/scripts/features/load b/tests/scripts/features/load
index 56f80e24..fa4b86f6 100644
--- a/tests/scripts/features/load
+++ b/tests/scripts/features/load
@@ -6,8 +6,8 @@ $details = "Test dynamic loading of modules.";
# Don't do anything if this system doesn't support "load"
exists $FEATURES{load} or return -1;
-# CONFIG_FLAGS are loaded from config-flags.pm and set by configure
-if (! exists $CONFIG_FLAGS{CC}) {
+my $cc = get_config('CC');
+if (! $cc) {
$verbose and print "Skipping load test: no CC defined\n";
return -1;
}
@@ -46,7 +46,10 @@ close($F) or die "close: testload.c: $!\n";
# Make sure we can compile
-my $sobuild = "$CONFIG_FLAGS{CC} ".($srcdir? "-I$srcdir/src":'')." $CONFIG_FLAGS{CPPFLAGS} $CONFIG_FLAGS{CFLAGS} -shared -fPIC $CONFIG_FLAGS{LDFLAGS} -o testload.so testload.c";
+my $cflags = get_config('CFLAGS');
+my $cppflags = get_config('CPPFLAGS');
+my $ldflags = get_config('LDFLAGS');
+my $sobuild = "$cc ".($srcdir? "-I$srcdir/src":'')." $cppflags $cflags -shared -fPIC $ldflags -o testload.so testload.c";
my $clog = `$sobuild 2>&1`;
if ($? != 0) {
diff --git a/tests/scripts/features/loadapi b/tests/scripts/features/loadapi
index c8895572..ba149281 100644
--- a/tests/scripts/features/loadapi
+++ b/tests/scripts/features/loadapi
@@ -6,8 +6,8 @@ $details = "Verify the different aspects of the shared object API.";
# Don't do anything if this system doesn't support "load"
exists $FEATURES{load} or return -1;
-# CONFIG_FLAGS are loaded from config-flags.pm and set by configure
-if (! exists $CONFIG_FLAGS{CC}) {
+my $cc = get_config('CC');
+if (! $cc) {
$verbose and print "Skipping load test: no CC defined\n";
return -1;
}
@@ -80,7 +80,10 @@ close($F) or die "close: testapi.c: $!\n";
# Make sure we can compile
-my $sobuild = "$CONFIG_FLAGS{CC} ".($srcdir? "-I$srcdir/src":'')." $CONFIG_FLAGS{CPPFLAGS} $CONFIG_FLAGS{CFLAGS} -shared -fPIC $CONFIG_FLAGS{LDFLAGS} -o testapi.so testapi.c";
+my $cflags = get_config('CFLAGS');
+my $cppflags = get_config('CPPFLAGS');
+my $ldflags = get_config('LDFLAGS');
+my $sobuild = "$cc ".($srcdir? "-I$srcdir/src":'')." $cppflags $cflags -shared -fPIC $ldflags -o testapi.so testapi.c";
my $clog = `$sobuild 2>&1`;
if ($? != 0) {
diff --git a/tests/scripts/functions/wildcard b/tests/scripts/functions/wildcard
index d1449af3..c3210eff 100644
--- a/tests/scripts/functions/wildcard
+++ b/tests/scripts/functions/wildcard
@@ -145,7 +145,7 @@ if ($port_type ne 'W32' && eval { symlink("",""); 1 }) {
# Test for dangling symlinks
# This doesn't work with the built-in glob... needs to be updated!
- if ($CONFIG_FLAGS{USE_SYSTEM_GLOB} eq 'yes') {
+ if (get_config('USE_SYSTEM_GLOB') eq 'yes') {
symlink($dir, $lnk);
run_make_test(qq!all: ; \@echo \$(wildcard $lnk)!, '', "$lnk");