File: test-driver-path-default

package info (click to toggle)
libconfig-model-lcdproc-perl 2.055-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 344 kB
  • sloc: perl: 320; makefile: 11
file content (69 lines) | stat: -rw-r--r-- 1,831 bytes parent folder | download
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
62
63
64
65
66
67
68
69
Description: Test driver path default
Forwarded: not-needed
Author: dod
--- a/t/model_tests.d/lcdd-test-conf.pl
+++ b/t/model_tests.d/lcdd-test-conf.pl
@@ -2,25 +2,34 @@
 use warnings;
 
 my @fix_warnings ;
+my $triplet = `dpkg-architecture -qDEB_HOST_MULTIARCH`;
+chomp $triplet;
+my $std_path = "/usr/lib/$triplet/lcdproc/" ;
+my $path = $std_path;
 
-push @fix_warnings,
+if (! -d $std_path) {
+   $path = "/tmp/" ;
+   push @fix_warnings,
     (
         #load_warnings => [ qr/code check returned false/ ],
-        load => "server DriverPath=/tmp/" , # just a work-around
+        load => "server DriverPath=$path" , # just a work-around
     )
-    unless -d '/usr/lib/lcdproc/' ;
+}
 
 my @tests = (
     {
         # t0
-        check => {
+        check => [
             'server Hello:0',           qq!  Bienvenue! ,
             'server Hello:1',           qq(   LCDproc et Config::Model!) ,
             'server Driver', 'curses',
+            'server DriverPath', { mode => 'standard', value => $std_path },
+            'server DriverPath', $path ,
             'curses Size', '20x2',
             'server AutoRotate', 'off',
-        },
+        ],
         @fix_warnings ,
+        apply_fix => 1,
         errors => [
             # qr/value 2 > max limit 0/ => 'fs:"/var/chroot/lenny-i386/dev" fs_passno=0' ,
         ],
@@ -31,11 +40,15 @@
     {
         # test upgrade from raw lcdproc 0.5.5
         name => 'LDCd-0.5.5',
+        @fix_warnings ,
+        apply_fix => 1,
         load_check => 'skip'
     },
     {
         # likewise for lcdproc 0.5.6
         name => 'LDCd-0.5.6',
+        @fix_warnings ,
+        apply_fix => 1,
         load_check => 'skip'
     },
     {
@@ -49,6 +62,7 @@
             'lirc prog','lcdd',
         },
         @fix_warnings ,
+        apply_fix => 1,
     },
 );