Debian Codegraph @

debian/patches/test-driver-path-default

raw
1 Description: Test driver path default
2 Forwarded: not-needed
3 Author: dod
4 --- a/t/model_tests.d/lcdd-test-conf.pl
5 +++ b/t/model_tests.d/lcdd-test-conf.pl
6 @@ -2,25 +2,34 @@
7 use warnings;
8
9 my @fix_warnings ;
10 +my $triplet = `dpkg-architecture -qDEB_HOST_MULTIARCH`;
11 +chomp $triplet;
12 +my $std_path = "/usr/lib/$triplet/lcdproc/" ;
13 +my $path = $std_path;
14
15 -push @fix_warnings,
16 +if (! -d $std_path) {
17 + $path = "/tmp/" ;
18 + push @fix_warnings,
19 (
20 #load_warnings => [ qr/code check returned false/ ],
21 - load => "server DriverPath=/tmp/" , # just a work-around
22 + load => "server DriverPath=$path" , # just a work-around
23 )
24 - unless -d '/usr/lib/lcdproc/' ;
25 +}
26
27 my @tests = (
28 {
29 # t0
30 - check => {
31 + check => [
32 'server Hello:0', qq! Bienvenue! ,
33 'server Hello:1', qq( LCDproc et Config::Model!) ,
34 'server Driver', 'curses',
35 + 'server DriverPath', { mode => 'standard', value => $std_path },
36 + 'server DriverPath', $path ,
37 'curses Size', '20x2',
38 'server AutoRotate', 'off',
39 - },
40 + ],
41 @fix_warnings ,
42 + apply_fix => 1,
43 errors => [
44 # qr/value 2 > max limit 0/ => 'fs:"/var/chroot/lenny-i386/dev" fs_passno=0' ,
45 ],
46 @@ -31,11 +40,15 @@
47 {
48 # test upgrade from raw lcdproc 0.5.5
49 name => 'LDCd-0.5.5',
50 + @fix_warnings ,
51 + apply_fix => 1,
52 load_check => 'skip'
53 },
54 {
55 # likewise for lcdproc 0.5.6
56 name => 'LDCd-0.5.6',
57 + @fix_warnings ,
58 + apply_fix => 1,
59 load_check => 'skip'
60 },
61 {
62 @@ -49,6 +62,7 @@
63 'lirc prog','lcdd',
64 },
65 @fix_warnings ,
66 + apply_fix => 1,
67 },
68 );
69