From: Brian Fraser Date: Wed, 13 Nov 2013 04:11:12 +0000 (-0300) Subject: t/porting/: Skips for cross-compilation X-Git-Tag: upstream/5.20.0~622 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a73a07586950cba837f564bb42b7b626e95b3bf;p=platform%2Fupstream%2Fperl.git t/porting/: Skips for cross-compilation --- diff --git a/t/porting/FindExt.t b/t/porting/FindExt.t index 478dca9..b3f9c31 100644 --- a/t/porting/FindExt.t +++ b/t/porting/FindExt.t @@ -16,6 +16,10 @@ if ($^O eq "MSWin32" && !defined $ENV{PERL_STATIC_EXT}) { skip_all "PERL_STATIC_EXT must be set to the list of static extensions"; } +if ( $Config{usecrosscompile} ) { + skip_all( "Not all files are available during cross-compilation" ); +} + require FindExt; FindExt::apply_config(\%Config); diff --git a/t/porting/args_assert.t b/t/porting/args_assert.t index 27e9bf2..c3188a7 100644 --- a/t/porting/args_assert.t +++ b/t/porting/args_assert.t @@ -2,9 +2,14 @@ use strict; use warnings; +use Config; require './test.pl'; +if ( $Config{usecrosscompile} ) { + skip_all( "Not all files are available during cross-compilation" ); +} + plan('no_plan'); # Fail for every PERL_ARGS_ASSERT* macro that was declared but not used. diff --git a/t/porting/checkcfgvar.t b/t/porting/checkcfgvar.t index 10eab2d..8a02b01 100644 --- a/t/porting/checkcfgvar.t +++ b/t/porting/checkcfgvar.t @@ -21,9 +21,15 @@ # then hand-edit configure.com (as that's not automated). # If this changes uconfig.sh, you'll also need to run perl regen/uconfig_h.pl +use Config; BEGIN { + require "./test.pl"; @INC = '..' if -f '../TestInit.pm'; } use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute +if ( $Config{usecrosscompile} ) { + skip_all( "Not all files are available during cross-compilation" ); +} + system "$^X Porting/checkcfgvar.pl --tap"; diff --git a/t/porting/copyright.t b/t/porting/copyright.t index c95286d..ab6226a 100644 --- a/t/porting/copyright.t +++ b/t/porting/copyright.t @@ -21,8 +21,12 @@ working on older releases. It should be run before making a new release. use TestInit; use strict; +use Config; BEGIN { require 'test.pl' } +if ( $Config{usecrosscompile} ) { + skip_all( "Not all files are available during cross-compilation" ); +} my ($opt) = @ARGV; diff --git a/t/porting/diag.t b/t/porting/diag.t index 3d2607c..d3e0021 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -7,8 +7,14 @@ use TestInit qw(T); # T is chdir to the top level use warnings; use strict; +use Config; require 't/test.pl'; + +if ( $Config{usecrosscompile} ) { + skip_all( "Not all files are available during cross-compilation" ); +} + plan('no_plan'); # --make-exceptions-list outputs the list of strings that don't have diff --git a/t/porting/dual-life.t b/t/porting/dual-life.t index 2d3ab91..8d9f070 100644 --- a/t/porting/dual-life.t +++ b/t/porting/dual-life.t @@ -9,6 +9,11 @@ use strict; chdir 't'; require './test.pl'; +use Config; +if ( $Config{usecrosscompile} ) { + skip_all( "Not all files are available during cross-compilation" ); +} + plan('no_plan'); use File::Basename; diff --git a/t/porting/exec-bit.t b/t/porting/exec-bit.t index 1deb376..3e80f84 100644 --- a/t/porting/exec-bit.t +++ b/t/porting/exec-bit.t @@ -1,6 +1,7 @@ #!/perl -w use 5.010; use strict; +use Config; # This test checks that anything with an executable bit is # identified in Porting/exec-bit.txt to makerel will set @@ -29,6 +30,10 @@ if ( $^O eq "vos" ) { skip_all( "VOS combines the read and execute permission bits." ); } +if ( $Config{usecrosscompile} ) { + skip_all( "Not all files are available during cross-compilation" ); +} + plan('no_plan'); use ExtUtils::Manifest qw(maniread); diff --git a/t/porting/maintainers.t b/t/porting/maintainers.t index 3744081..cd4519d 100644 --- a/t/porting/maintainers.t +++ b/t/porting/maintainers.t @@ -14,6 +14,11 @@ BEGIN { require './t/test.pl'; } +use Config; +if ( $Config{usecrosscompile} ) { + skip_all( "Odd failures during cross-compilation" ); +} + use strict; use warnings; use Maintainers qw(show_results process_options finish_tap_output); diff --git a/t/porting/manifest.t b/t/porting/manifest.t index c367fc7..a88f364 100644 --- a/t/porting/manifest.t +++ b/t/porting/manifest.t @@ -24,6 +24,7 @@ # which will output "WARNING: re-sorting MANIFEST" but which will also # correct the problem. +use Config; BEGIN { @INC = '..' if -f '../TestInit.pm'; } @@ -31,6 +32,10 @@ use TestInit qw(T); # T is chdir to the top level require 't/test.pl'; +skip_all("Cross-compiling, the entire source might not be available") + if $Config{usecrosscompile}; + + plan('no_plan'); my $manifest = 'MANIFEST'; diff --git a/t/porting/perlfunc.t b/t/porting/perlfunc.t index fb0209d..e278e4e 100644 --- a/t/porting/perlfunc.t +++ b/t/porting/perlfunc.t @@ -22,9 +22,15 @@ # Pod::Functions provided by a =for directive. BEGIN { - @INC = '..' if -f '../TestInit.pm'; + @INC = ('..', '../lib') if -f '../TestInit.pm'; } +use Config; use TestInit qw(T A); # T is chdir to the top level, A makes paths absolute +if ( $Config{usecrosscompile} ) { + print "1..0 # Not all files are available during cross-compilation\n"; + exit 0; +} + system "$^X ext/Pod-Functions/Functions_pm.PL --tap pod/perlfunc.pod"; diff --git a/t/porting/pod_rules.t b/t/porting/pod_rules.t index 5c69483..c3cd8f8 100644 --- a/t/porting/pod_rules.t +++ b/t/porting/pod_rules.t @@ -27,6 +27,11 @@ BEGIN { use strict; require 't/test.pl'; +use Config; +if ( $Config{usecrosscompile} ) { + skip_all( "Not all files are available during cross-compilation" ); +} + my $result = runperl(switches => ['-f', '-Ilib'], progfile => 'Porting/pod_rules.pl', args => ['--tap'], diff --git a/t/porting/podcheck.t b/t/porting/podcheck.t index 8fc674c..ac0f2d5 100644 --- a/t/porting/podcheck.t +++ b/t/porting/podcheck.t @@ -18,6 +18,10 @@ use Scalar::Util; use Text::Tabs; BEGIN { + if ( $Config{usecrosscompile} ) { + print "1..0 # Not all files are available during cross-compilation\n"; + exit 0; + } require '../regen/regen_lib.pl'; } diff --git a/t/porting/regen.t b/t/porting/regen.t index 7450613..1e481a2 100644 --- a/t/porting/regen.t +++ b/t/porting/regen.t @@ -15,6 +15,10 @@ $::NO_ENDING = $::NO_ENDING = 1; if ( $^O eq "VMS" ) { skip_all( "- regen.pl needs porting." ); } +use Config; +if ( $Config{usecrosscompile} ) { + skip_all( "Not all files are available during cross-compilation" ); +} my $tests = 26; # I can't see a clean way to calculate this automatically. diff --git a/t/porting/ss_dup.t b/t/porting/ss_dup.t index 5fa2960..caa0086 100644 --- a/t/porting/ss_dup.t +++ b/t/porting/ss_dup.t @@ -3,7 +3,12 @@ @TODO = qw [ SAVEt_SAVESWITCHSTACK ]; @TODO{@TODO} = (); -BEGIN { chdir 't'; require './test.pl' } +BEGIN { chdir 't'; unshift @INC, "../lib"; require './test.pl' } +use Config; + +if ( $Config{usecrosscompile} ) { + skip_all( "Not all files are available during cross-compilation" ); +} sub read_cases { my ($file, $func) = @_;