[svn:parrot] r48925 - in trunk: config/auto lib/Parrot/Configure/Options lib/Parrot/Configure/Options/Conf t/steps/auto
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sat Sep 11 01:21:56 UTC 2010
Author: jkeenan
Date: Sat Sep 11 01:21:55 2010
New Revision: 48925
URL: https://trac.parrot.org/parrot/changeset/48925
Log:
Applying patch submitted by ash++ in http://trac.parrot.org/parrot/ticket/1774, plus additional tests for case of new configuration option '--without-readline'.
Modified:
trunk/config/auto/readline.pm
trunk/lib/Parrot/Configure/Options/Conf.pm
trunk/lib/Parrot/Configure/Options/Conf/Shared.pm
trunk/t/steps/auto/readline-01.t
Modified: trunk/config/auto/readline.pm
==============================================================================
--- trunk/config/auto/readline.pm Fri Sep 10 23:44:28 2010 (r48924)
+++ trunk/config/auto/readline.pm Sat Sep 11 01:21:55 2010 (r48925)
@@ -36,6 +36,14 @@
sub runstep {
my ( $self, $conf ) = @_;
+ my $without_opt = $conf->options->get('without-readline');
+
+ if ($without_opt) {
+ $conf->data->set('HAS_READLINE' => 0);
+ $self->set_result('not requested');
+ return 1;
+ }
+
my $cc = $conf->data->get('cc');
my $osname = $conf->data->get('osname');
Modified: trunk/lib/Parrot/Configure/Options/Conf.pm
==============================================================================
--- trunk/lib/Parrot/Configure/Options/Conf.pm Fri Sep 10 23:44:28 2010 (r48924)
+++ trunk/lib/Parrot/Configure/Options/Conf.pm Sat Sep 11 01:21:55 2010 (r48925)
@@ -102,6 +102,7 @@
--without-gettext Build parrot without gettext support
--without-gmp Build parrot without GMP support
--without-opengl Build parrot without OpenGL support (GL/GLU/GLUT)
+ --without-readline Build parrot without readline support
--without-pcre Build parrot without pcre support
--without-zlib Build parrot without zlib support
Modified: trunk/lib/Parrot/Configure/Options/Conf/Shared.pm
==============================================================================
--- trunk/lib/Parrot/Configure/Options/Conf/Shared.pm Fri Sep 10 23:44:28 2010 (r48924)
+++ trunk/lib/Parrot/Configure/Options/Conf/Shared.pm Sat Sep 11 01:21:55 2010 (r48925)
@@ -77,6 +77,7 @@
without-gmp
without-icu
without-opengl
+ without-readline
without-pcre
without-threads
without-zlib
Modified: trunk/t/steps/auto/readline-01.t
==============================================================================
--- trunk/t/steps/auto/readline-01.t Fri Sep 10 23:44:28 2010 (r48924)
+++ trunk/t/steps/auto/readline-01.t Sat Sep 11 01:21:55 2010 (r48925)
@@ -5,7 +5,7 @@
use strict;
use warnings;
-use Test::More tests => 9;
+use Test::More tests => 15;
use Carp;
use Cwd;
use File::Spec;
@@ -23,13 +23,14 @@
my ($args, $step_list_ref) = process_options(
{
- argv => [ ],
+ argv => [ '--without-readline' ],
mode => q{configure},
}
);
my $conf = Parrot::Configure::Step::Test->new;
$conf->include_config_results( $args );
+my $serialized = $conf->pcfreeze();
my $pkg = q{auto::readline};
@@ -37,6 +38,26 @@
$conf->options->set( %{$args} );
my $step = test_step_constructor_and_description($conf);
+my $ret = $step->runstep($conf);
+ok( $ret, "runstep() returned true value" );
+is($step->result(), q{not requested},
+ "Got expected result for 'without-readline'");
+is($conf->data->get('HAS_READLINE'), 0,
+ "Got expected value for HAS_READLINE");
+
+$conf->replenish($serialized);
+
+($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);
+
# Mock values for OS and C-compiler
my ($osname, $cc);
$osname = 'mswin32';
More information about the parrot-commits
mailing list