From 0b4dcbc1baee12b555171b57071e6d5f2b479818 Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Thu, 25 Nov 2010 14:14:18 -0800 Subject: [PATCH] Pass STATIC_EXT to t/porting/FindExt.t The list of static extensions on Windows is only known inside win32/Makefile and win32/makefile.mk, so we need to somehow pass it to t/porting/FindExt.t to give it a chance to pass on Windows. Unfortunately this means that PERL_STATIC_EXT will have to be set manually if this test is to be run directly and not via the Makefile. --- t/porting/FindExt.t | 5 +++++ win32/Makefile | 1 + win32/makefile.mk | 9 ++++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/t/porting/FindExt.t b/t/porting/FindExt.t index c1be9d9..a877f8b 100644 --- a/t/porting/FindExt.t +++ b/t/porting/FindExt.t @@ -12,6 +12,10 @@ use strict; # varies based on which headers are present, and which options ./Configure was # invoked with. +if ($^O eq "MSWin32" && !defined $ENV{PERL_STATIC_EXT}) { + skip_all "PERL_STATIC_EXT must be set to the list of static extensions"; +} + plan tests => 10; use FindExt; use Config; @@ -19,6 +23,7 @@ use Config; FindExt::scan_ext('../cpan'); FindExt::scan_ext('../dist'); FindExt::scan_ext('../ext'); +FindExt::set_static_extensions(split ' ', $ENV{PERL_STATIC_EXT}) if $^O eq "MSWin32"; # Config.pm and FindExt.pm make different choices about what should be built my @config_built; diff --git a/win32/Makefile b/win32/Makefile index 700c900..4e1910e 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -1260,6 +1260,7 @@ test-prep : all utils $(XCOPY) $(PERLEXE) ..\t\$(NULL) $(XCOPY) $(PERLDLL) ..\t\$(NULL) $(XCOPY) $(GLOBEXE) ..\t\$(NULL) + set PERL_STATIC_EXT=$(STATIC_EXT) test : test-prep cd ..\t diff --git a/win32/makefile.mk b/win32/makefile.mk index b7264aa..0c68318 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -1663,7 +1663,8 @@ test-prep : all utils .ENDIF test : $(RIGHTMAKE) test-prep - cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES) + set PERL_STATIC_EXT=$(STATIC_EXT) && \ + cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES) test-reonly : reonly utils $(XCOPY) $(PERLEXE) ..\t\$(NULL) @@ -1677,7 +1678,8 @@ regen : cd .. && regen.pl && cd win32 test-notty : test-prep - set PERL_SKIP_TTY_TEST=1 && \ + set PERL_STATIC_EXT=$(STATIC_EXT) && \ + set PERL_SKIP_TTY_TEST=1 && \ cd ..\t && $(PERLEXE) -I.\lib harness $(TEST_SWITCHES) $(TEST_FILES) _test : $(RIGHTMAKE) @@ -1688,7 +1690,8 @@ _test : $(RIGHTMAKE) .ELSE $(XCOPY) $(GLOBEXE) ..\t\$(NULL) .ENDIF - cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES) + set PERL_STATIC_EXT=$(STATIC_EXT) && \ + cd ..\t && $(PERLEXE) -I..\lib harness $(TEST_SWITCHES) $(TEST_FILES) _clean : -@erase miniperlmain$(o) -- 2.7.4