Ver código fonte

Namespace temporary directories for test cases

We avoid any name clashes during the test suite run. And the hierarchy
gets more clear when debugging in case any problem arises.
Guillem Jover 16 anos atrás
pai
commit
791ec28602
2 arquivos alterados com 3 adições e 2 exclusões
  1. 2 1
      scripts/t/500_Dpkg_Path.t
  2. 1 1
      scripts/t/900_update_alternatives.t

+ 2 - 1
scripts/t/500_Dpkg_Path.t

@@ -22,8 +22,9 @@ use_ok('Dpkg::Path', 'canonpath', 'resolve_symlink',
        'check_files_are_the_same', 'get_pkg_root_dir',
        'guess_pkg_root_dir', 'relative_to_pkg_root');
 
-my $tmpdir = 't.tmp';
+my $tmpdir = 't.tmp/500_Dpkg_Path';
 
+mkdir $tmpdir;
 mkdir "$tmpdir/a";
 mkdir "$tmpdir/a/b";
 mkdir "$tmpdir/a/b/c";

+ 1 - 1
scripts/t/900_update_alternatives.t

@@ -21,7 +21,7 @@ use strict;
 use warnings;
 
 my $srcdir = $ENV{srcdir} || '.';
-my $tmpdir = 't.tmp';
+my $tmpdir = 't.tmp/900_update_alternatives';
 my $admindir = File::Spec->rel2abs("$tmpdir/admindir"),
 my $altdir = File::Spec->rel2abs("$tmpdir/alternatives");
 my $bindir = File::Spec->rel2abs("$tmpdir/bin");