Description:Test driver path default
Author:dod
Applied-Upstream:NA
--- a/t/model_tests.d/lcdd-test-conf.pl
+++ b/t/model_tests.d/lcdd-test-conf.pl
@@ -11,25 +11,35 @@
 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,
+        load_warnings => [ qr/missing DriverPath dir/],
         errors => [
             # qr/value 2 > max limit 0/ => 'fs:"/var/chroot/lenny-i386/dev" fs_passno=0' ,
         ],
@@ -40,15 +50,22 @@
     {
         # test upgrade from raw lcdproc 0.5.5
         name => 'LDCd-0.5.5',
+        load_warnings => [ qr/missing DriverPath dir/],
+        @fix_warnings ,
+        apply_fix => 1,
         load_check => 'skip'
     },
     {
         # likewise for lcdproc 0.5.6
         name => 'LDCd-0.5.6',
+        load_warnings => [ qr/missing DriverPath dir/],
+        @fix_warnings ,
+        apply_fix => 1,
         load_check => 'skip'
     },
     {
         name => 'with-2-drivers',
+        load_warnings => [ qr/missing DriverPath dir/],
         check => {
             'server Hello:0',           qq!  Bienvenue! ,
             'server Hello:1',           qq(   LCDproc et Config::Model!) ,
@@ -58,6 +75,7 @@
             'lirc prog','lcdd',
         },
         @fix_warnings ,
+        apply_fix => 1,
     },
 );
 
