Permalink
Browse files

Update msys-related tests. gerdr++. Update copyright dates.

  • Loading branch information...
1 parent b3ced86 commit 7d3ff40d5c63dbafa79e496028a39acde7b3294d @jkeenan jkeenan committed Aug 13, 2011
Showing with 36 additions and 11 deletions.
  1. +4 −2 config/auto/arch.pm
  2. +3 −2 config/gen/config_pm.pm
  3. +1 −1 config/init/hints/msys.pm
  4. +22 −2 t/steps/auto/arch-01.t
  5. +6 −4 t/steps/auto/headers-01.t
View
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2007, Parrot Foundation.
+# Copyright (C) 2001-2011, Parrot Foundation.
=head1 NAME
@@ -84,7 +84,9 @@ sub runstep {
# the OS. Might be incorrect in case of mingw32 on 64bit hardware.
$cpuarch = lc (
$ENV{PROCESSOR_ARCHITEW6432} ||
- $ENV{PROCESSOR_ARCHITECTURE} );
+ $ENV{PROCESSOR_ARCHITECTURE} ||
+ 'x86'
+ );
$osname = 'msys';
}
elsif ( $cpuarch eq 'i86pc' and $osname eq 'solaris' ) {
View
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2010, Parrot Foundation.
+# Copyright (C) 2001-2011, Parrot Foundation.
=head1 NAME
@@ -74,7 +74,8 @@ sub runstep {
my $cwd = cwd();
# expand msys virtual paths
- $cwd = `cd '$cwd' && pwd -W`, chomp $cwd if $^O eq 'msys';
+ $cwd = `cd '$cwd' && pwd -W`, chomp $cwd
+ if $conf->data->get('osname') eq 'msys';
# escape spaces in current directory
$cwd =~ s{ }{\\ }g;
@@ -1,4 +1,4 @@
-# Copyright (C) 2005-2007, Parrot Foundation.
+# Copyright (C) 2005-2011, Parrot Foundation.
package init::hints::msys;
View
@@ -1,10 +1,10 @@
#! perl
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2011, Parrot Foundation.
# auto/arch-01.t
use strict;
use warnings;
-use Test::More tests => 83;
+use Test::More tests => 89;
use Carp;
use lib qw( lib t/configure/testlib );
use_ok('config::auto::arch');
@@ -196,6 +196,26 @@ is($conf->data->get('osname'), q{cygwin},
$conf->replenish($serialized);
+########## mock msys ##########
+
+($args, $step_list_ref) = process_options( {
+ argv => [ ],
+ mode => q{configure},
+} );
+
+$conf->add_steps($pkg);
+$conf->options->set( %{$args} );
+$step = test_step_constructor_and_description($conf);
+$pseudoarch = q{msys};
+$conf->data->set('archname' => $pseudoarch);
+$ret = $step->runstep($conf);
+ok( $ret, "runstep() returned true value: $pseudoarch" );
+is($step->result(), q{}, "Result was empty string as expected");
+is($conf->data->get('osname'), q{msys},
+ "'osname' was set as expected");
+
+$conf->replenish($serialized);
+
########## mock powerpc-linux ##########
($args, $step_list_ref) = process_options( {
View
@@ -1,10 +1,10 @@
#! perl
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2011, Parrot Foundation.
# auto/headers-01.t
use strict;
use warnings;
-use Test::More tests => 20;
+use Test::More tests => 21;
use Carp;
use lib qw( lib t/configure/testlib );
use_ok('config::auto::headers');
@@ -85,8 +85,10 @@ ok(! $conf->data->get('i_niin'), "Mapping made correctly");
$conf->data->set( OSNAME_provisional => $os );
my %extra_headers =
map {$_, 1} auto::headers::_list_extra_headers($conf);
- ok($extra_headers{'sysmman.h'}, "Special header set for $os");
- ok($extra_headers{'netdb.h'}, "Special header set for $os");
+ my @special_headers = qw(sysmman.h netdb.h sys/utsname.h);
+ foreach my $h (@special_headers) {
+ ok($extra_headers{$h}, "Special header $h set for $os");
+ }
}
{

0 comments on commit 7d3ff40

Please sign in to comment.