[svn:parrot] r47177 - in branches/tt1452_configure_debug: config/auto config/init lib/Parrot/Configure/Step t/steps/auto t/steps/init
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Mon May 31 01:08:54 UTC 2010
Author: jkeenan
Date: Mon May 31 01:08:54 2010
New Revision: 47177
URL: https://trac.parrot.org/parrot/changeset/47177
Log:
[configure] Config step auto::extra_nci_thunks does not conduct a probe; hence, does not need to be a separate 'auto' step. Merge into init::defaults.
Deleted:
branches/tt1452_configure_debug/config/auto/extra_nci_thunks.pm
branches/tt1452_configure_debug/t/steps/auto/extra_nci_thunks-01.t
Modified:
branches/tt1452_configure_debug/config/init/defaults.pm
branches/tt1452_configure_debug/lib/Parrot/Configure/Step/List.pm
branches/tt1452_configure_debug/t/steps/init/defaults-01.t
Deleted: branches/tt1452_configure_debug/config/auto/extra_nci_thunks.pm
==============================================================================
--- branches/tt1452_configure_debug/config/auto/extra_nci_thunks.pm Mon May 31 01:08:54 2010 (r47176)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,54 +0,0 @@
-# Copyright (C) 2010, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-config/auto/extra_nci_thunks - Static NCI Frame Building
-
-=head1 DESCRIPTION
-
-If C<--without-extra-nci-thunks> is specified, builds parrot without NCI thunks
-not required by core.
-
-=cut
-
-package auto::extra_nci_thunks;
-
-use strict;
-use warnings;
-
-use base 'Parrot::Configure::Step';
-
-sub _init {
- my $self = shift;
- return {
- description => 'Determine whether to build extra NCI thunks',
- };
-}
-
-sub runstep {
- my ($self, $conf) = @_;
- my $without = $conf->options->get( 'without-extra-nci-thunks' );
-
- if ($without) {
- $conf->data->set( has_extra_nci_thunks => 0 );
- $conf->data->set( HAS_EXTRA_NCI_THUNKS => 0 );
- $self->set_result( 'no' );
- }
- else {
- $conf->data->set( has_extra_nci_thunks => 1 );
- $conf->data->set( HAS_EXTRA_NCI_THUNKS => 1 );
- $self->set_result( 'yes' );
- }
-
- return 1;
-}
-
-1;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: branches/tt1452_configure_debug/config/init/defaults.pm
==============================================================================
--- branches/tt1452_configure_debug/config/init/defaults.pm Sun May 30 22:50:46 2010 (r47176)
+++ branches/tt1452_configure_debug/config/init/defaults.pm Mon May 31 01:08:54 2010 (r47177)
@@ -258,6 +258,13 @@
$conf->data->set( 'archname', $Config{archname});
+ $conf->data->set( has_extra_nci_thunks => 1 );
+ $conf->data->set( HAS_EXTRA_NCI_THUNKS => 1 );
+ if ( $conf->options->get( 'without-extra-nci-thunks' ) ) {
+ $conf->data->set( has_extra_nci_thunks => 0 );
+ $conf->data->set( HAS_EXTRA_NCI_THUNKS => 0 );
+ }
+
# adjust archname, cc and libs for e.g. --m=32
# remember corrected archname - jit.pm was using $Config('archname')
_64_bit_adjustments($conf);
Modified: branches/tt1452_configure_debug/lib/Parrot/Configure/Step/List.pm
==============================================================================
--- branches/tt1452_configure_debug/lib/Parrot/Configure/Step/List.pm Sun May 30 22:50:46 2010 (r47176)
+++ branches/tt1452_configure_debug/lib/Parrot/Configure/Step/List.pm Mon May 31 01:08:54 2010 (r47177)
@@ -48,7 +48,6 @@
auto::socklen_t
auto::neg_0
auto::env
- auto::extra_nci_thunks
auto::thread
auto::gmp
auto::readline
Deleted: branches/tt1452_configure_debug/t/steps/auto/extra_nci_thunks-01.t
==============================================================================
--- branches/tt1452_configure_debug/t/steps/auto/extra_nci_thunks-01.t Mon May 31 01:08:54 2010 (r47176)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,87 +0,0 @@
-#! perl
-# Copyright (C) 2010, Parrot Foundation.
-# $Id$
-# auto/extra_nci_thunks-01.t
-
-=head1 NAME
-
-auto/extra_nci_thunks-01.t - test auto::extra_nci_thunks
-
-=head1 SYNOPSIS
-
- % prove t/steps/auto/extra_nci_thunks-01.t
-
-=head1 DESCRIPTION
-
-The files in this directory test functionality used by F<Configure.pl>.
-
-The tests in this file test auto::extra_nci_thunks.
-
-=head1 SEE ALSO
-
-config::auto::libjit, F<Configure.pl>.
-
-=cut
-
-use strict;
-use warnings;
-
-use Test::More tests => 21;
-
-use lib qw( lib t/configure/testlib );
-use Parrot::Configure;
-use Parrot::Configure::Options 'process_options';
-use Parrot::Configure::Test qw(
- test_step_thru_runstep
- rerun_defaults_for_testing
- test_step_constructor_and_description
-);
-
-use_ok('config::init::defaults');
-use_ok('config::auto::extra_nci_thunks');
-
-my ($args, $step_list_ref) = process_options( {
- argv => [ q{--without-extra-nci-thunks} ],
- mode => 'configure',
-} );
-
-my $conf = Parrot::Configure->new;
-my $serialized = $conf->pcfreeze();
-
-test_step_thru_runstep( $conf, 'init::defaults', $args );
-
-my $pkg = 'auto::extra_nci_thunks';
-my ($step, $ret);
-
-$conf->add_steps($pkg);
-$conf->options->set(%$args);
-$step = test_step_constructor_and_description($conf);
-$ret = $step->runstep($conf);
-ok( $ret, "runstep() returned true value" );
-is( $step->result(), 'no', "Result is 'no', as expected" );
-is( $conf->data->get( 'HAS_EXTRA_NCI_THUNKS' ), 0,
- "Got the expected result with '--without-extra-nci-thunks' option" );
-
-$conf->replenish($serialized);
-
-($args, $step_list_ref) = process_options( {
- argv => [ ],
- mode => 'configure',
-} );
-rerun_defaults_for_testing($conf, $args);
-$conf->add_steps($pkg);
-$conf->options->set( %{$args} );
-$step = test_step_constructor_and_description($conf);
-$ret = $step->runstep($conf);
-ok( $ret, "runstep() returned a true value" );
-is( $step->result(), 'yes', "Default result is 'yes' as expected" );
-is( $conf->data->get( 'has_extra_nci_thunks' ), 1,
- "Get the expected result without '--without-extra-nci-thunks' option" );
-
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Modified: branches/tt1452_configure_debug/t/steps/init/defaults-01.t
==============================================================================
--- branches/tt1452_configure_debug/t/steps/init/defaults-01.t Sun May 30 22:50:46 2010 (r47176)
+++ branches/tt1452_configure_debug/t/steps/init/defaults-01.t Mon May 31 01:08:54 2010 (r47177)
@@ -5,7 +5,7 @@
use strict;
use warnings;
-use Test::More tests => 37;
+use Test::More tests => 49;
use Carp;
use Cwd;
use File::Copy;
@@ -143,6 +143,44 @@
is($conf->data->get( 'linkflags' ), '-bundle -L/usr/local/lib64',
"Got expected value for 'linkflags'");
+$conf->replenish($serialized);
+
+##### with extra-nci-thunks #####
+($args, $step_list_ref) = process_options(
+ {
+ argv => [ ],
+ mode => q{configure},
+ }
+);
+
+$conf->options->set( %{$args} );
+$step = test_step_constructor_and_description($conf);
+$ret = $step->runstep($conf);
+ok( defined $ret, "runstep() returned defined value" );
+ok($conf->data->get( 'has_extra_nci_thunks' ),
+ "Got expected value for has_extra_nci_thunks" );
+ok($conf->data->get( 'HAS_EXTRA_NCI_THUNKS' ),
+ "Got expected value for HAS_EXTRA_NCI_THUNKS" );
+
+$conf->replenish($serialized);
+
+##### without extra-nci-thunks #####
+($args, $step_list_ref) = process_options(
+ {
+ argv => [ q{--without-extra-nci-thunks} ],
+ mode => q{configure},
+ }
+);
+
+$conf->options->set( %{$args} );
+$step = test_step_constructor_and_description($conf);
+$ret = $step->runstep($conf);
+ok( defined $ret, "runstep() returned defined value" );
+ok(! $conf->data->get( 'has_extra_nci_thunks' ),
+ "Got expected value for has_extra_nci_thunks" );
+ok(! $conf->data->get( 'HAS_EXTRA_NCI_THUNKS' ),
+ "Got expected value for HAS_EXTRA_NCI_THUNKS" );
+
pass("Completed all tests in $0");
################### DOCUMENTATION ###################
More information about the parrot-commits
mailing list