diff options
author | Jan Dubois <jand@activestate.com> | 2010-11-25 14:14:18 -0800 |
---|---|---|
committer | Jan Dubois <jand@activestate.com> | 2010-11-25 14:23:06 -0800 |
commit | 0b4dcbc1baee12b555171b57071e6d5f2b479818 (patch) | |
tree | b9da4f6fcf6d7fc2789feba46bbc11cc56f1f1b8 | |
parent | 41ed632ef2f96ef1cd60c4ad0dba5a29ba54e27e (diff) | |
download | perl-0b4dcbc1baee12b555171b57071e6d5f2b479818.tar.gz |
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.
-rw-r--r-- | t/porting/FindExt.t | 5 | ||||
-rw-r--r-- | win32/Makefile | 1 | ||||
-rw-r--r-- | win32/makefile.mk | 9 |
3 files changed, 12 insertions, 3 deletions
diff --git a/t/porting/FindExt.t b/t/porting/FindExt.t index c1be9d9649..a877f8bb93 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 700c9005b2..4e1910ee66 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 b7264aa61c..0c68318e73 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) |