Commit aa8b857b authored by Michael Pyne's avatar Michael Pyne

Fix crash from missing $ctx object.

Introduced with some of the code refactoring in this branch only.  Test
added to verify we can at least get through generating the module list.
parent 559432cd
......@@ -449,7 +449,8 @@ sub _loadUserOptions
# Returns: List of Modules to build.
sub generateModuleList
{
my ($self, $ctx) = @_;
my $self = shift;
my $ctx = $self->context();
my $cmdlineOptions = $ctx->cmdlineOptions();
my $cmdlineGlobalOptions = $cmdlineOptions->{global};
......
global
source-dir /tmp
end global
module test1
# should default to SVN on the old anonsvn for now
end module
module test2
repository git://anongit.kde.org/kdesrc-build.git
end module
use 5.018;
use strict;
use warnings;
use Test::More;
use ksb::Application;
my $app = ksb::Application->new(qw(--pretend --rc-file t/data/gen-module-list/kdesrc-buildrc));
my @moduleList = $app->generateModuleList();
ok(@moduleList > 0, 'Multiple modules to build');
done_testing();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment