1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
use strict;
use warnings;
my $from_scratch_file = <<'EOF' ;
## This file was written by cme command.
## You can run 'cme edit multistrap' to modify this file.
## You may also modify the content of this file with your favorite editor.
[general]
include = /usr/share/multistrap/crosschroot.conf
EOF
my @tests = (
{
name => 'arm',
config_file => '/home/foo/my_arm.conf',
check => {
'sections:toolchains packages:0' ,'g++-4.2-arm-linux-gnu',
'sections:toolchains packages:1', 'linux-libc-dev-arm-cross',
},
load_warnings => undef , # some weird warnings pop up in Perl smoke tests with perl 5.15.9
},
{
name => 'from_scratch',
config_file => '/home/foo/my_arm.conf',
load => "include=/usr/share/multistrap/crosschroot.conf" ,
check => {
# values brought by included file
'sections:debian packages:0', {qw/mode layered value dpkg-dev/},
'sections:base packages:0', {qw/mode layered value gcc-4.2-base/},
'sections:toolchains packages:0', undef,
'sections:toolchains packages:1', undef,
},
file_check_sub => sub {
my $r = shift ;
# this file was created after the load instructions above
unshift @$r, "/home/foo/my_arm.conf";
},
file_content => {
"/home/foo/my_arm.conf" => $from_scratch_file ,
}
},
{
name => 'igep0020',
config_file => '/home/foo/strap-igep0020.conf',
load_check => 'skip',
log4perl_load_warnings => [
[ 'User', warn => qr/deprecated/ ] ,
[ 'User' , ( warn => qr/skipping/) x 2 ]
],
},
);
return {
model_to_test => "Multistrap",
tests => \@tests
};
|