t/porting/: Skips for cross-compilation
authorBrian Fraser <fraserbn@gmail.com>
Wed, 13 Nov 2013 04:11:12 +0000 (01:11 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Sat, 25 Jan 2014 15:37:10 +0000 (12:37 -0300)
14 files changed:
t/porting/FindExt.t
t/porting/args_assert.t
t/porting/checkcfgvar.t
t/porting/copyright.t
t/porting/diag.t
t/porting/dual-life.t
t/porting/exec-bit.t
t/porting/maintainers.t
t/porting/manifest.t
t/porting/perlfunc.t
t/porting/pod_rules.t
t/porting/podcheck.t
t/porting/regen.t
t/porting/ss_dup.t

index 478dca9..b3f9c31 100644 (file)
@@ -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);
index 27e9bf2..c3188a7 100644 (file)
@@ -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.
index 10eab2d..8a02b01 100644 (file)
 # 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";
index c95286d..ab6226a 100644 (file)
@@ -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;
 
index 3d2607c..d3e0021 100644 (file)
@@ -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
index 2d3ab91..8d9f070 100644 (file)
@@ -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;
index 1deb376..3e80f84 100644 (file)
@@ -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);
index 3744081..cd4519d 100644 (file)
@@ -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);
index c367fc7..a88f364 100644 (file)
@@ -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';
index fb0209d..e278e4e 100644 (file)
 # 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";
index 5c69483..c3cd8f8 100644 (file)
@@ -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'],
index 8fc674c..ac0f2d5 100644 (file)
@@ -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';
 }
 
index 7450613..1e481a2 100644 (file)
@@ -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.
 
index 5fa2960..caa0086 100644 (file)
@@ -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) = @_;