Kaynağa Gözat

src/t: Fix dpkg-divert.t to work on BSD userland

On FreeBSD «rm -rf» cannot traverse a directory with mode 000, so we
need to remove it beforehand.
Guillem Jover 11 yıl önce
ebeveyn
işleme
16fd072481
2 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 2 0
      debian/changelog
  2. 2 0
      src/t/dpkg_divert.t

+ 2 - 0
debian/changelog

@@ -69,6 +69,8 @@ dpkg (1.18.0) UNRELEASED; urgency=low
       perl modules can always produce localized messages.
   * Test suite:
     - Check perl code compilation, warnings and strictness.
+    - Fix dpkg-divert unit test to work on BSD «rm -rf» that cannot traverse
+      directories with mode 000.
   * Build system:
     - Bump gettext version to 0.19:
       + Use --add-location=file in msgmerge and xgettext commands.

+ 2 - 0
src/t/dpkg_divert.t

@@ -43,6 +43,8 @@ if (! -x "@dd") {
 plan tests => 257;
 
 sub cleanup {
+    # On FreeBSD «rm -rf» cannot traverse a directory with mode 000.
+    system("test -d $testdir/nadir && rmdir $testdir/nadir");
     system("rm -rf $tmpdir && mkdir -p $testdir");
     system("mkdir -p $admindir/updates");
     system("rm -f $admindir/status && touch $admindir/status");