The following commit has been merged in the master branch:
commit 9817bf199f7197a16f55ed3a1503cb634a01ce81
Author: Guillem Jover <[email protected]>
Date:   Tue Sep 27 18:11:26 2011 +0200

    Do not assume existence of paths on the build system in the test suite
    
    Instead of using /etc use a known to exist directory in the build tree,
    and instead of hardcoding /bin/true, let the command module find it
    in the PATH.

diff --git a/debian/changelog b/debian/changelog
index b8e527d..6f055a2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,7 @@ dpkg (1.16.2) UNRELEASED; urgency=low
     needing them will compile correctly.
   * Check for the presence of the strnlen declaration and correctly provide
     the compat one in case the systems lacks it.
+  * Do not assume existence of paths on the build system in the test suite.
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann).
diff --git a/lib/dpkg/test/t-command.c b/lib/dpkg/test/t-command.c
index 6cbd7f8..2e5e05c 100644
--- a/lib/dpkg/test/t-command.c
+++ b/lib/dpkg/test/t-command.c
@@ -139,7 +139,7 @@ test_command_exec(void)
        struct command cmd;
        pid_t pid;
 
-       command_init(&cmd, "/bin/true", "exec test");
+       command_init(&cmd, "true", "exec test");
 
        command_add_arg(&cmd, "arg 0");
        command_add_arg(&cmd, "arg 1");
diff --git a/src/t/100_dpkg_divert.t b/src/t/100_dpkg_divert.t
index 4b50535..5a46031 100644
--- a/src/t/100_dpkg_divert.t
+++ b/src/t/100_dpkg_divert.t
@@ -146,7 +146,7 @@ install_diversions('');
 call_divert_badusage(['--add',], qr/needs a single argument/);
 call_divert_badusage(['--add', 'foo'], qr/absolute/);
 call_divert_badusage(['--add', "/foo\nbar"], qr/newline/);
-call_divert_badusage(['--add', "/etc"], qr/director(y|ies)/);
+call_divert_badusage(['--add', "$testdir"], qr/director(y|ies)/);
 call_divert_badusage(['--add', "--divert", "bar", "/foo/bar"], qr/absolute/);
 call_divert_badusage(['--remove'], qr/needs a single argument/);
 call([@dd, '--admindir'], [],

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to