diff options
author | Guillem Jover <guillem@debian.org> | 2009-03-02 06:09:24 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2009-03-02 07:04:51 +0200 |
commit | 33a84d38568ef6de0c8becbe9fdea8ee5ad98a65 (patch) | |
tree | bf2bdc9da094ac8e762780ca6d591371548354ef | |
parent | 8ba416cb3f7afd75fd422e93b4fed727f211cd80 (diff) | |
download | dpkg-33a84d38568ef6de0c8becbe9fdea8ee5ad98a65.tar.gz |
u-a: Fix test suite to use t.tmp from builddir instead of srcdir
This fixes “make distcheck”, as t.tmp is a read/write directory it has
to be used under builddir, which in most cases happens to be the same as
srcdir.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | scripts/t/900_update_alternatives.t | 8 |
2 files changed, 9 insertions, 4 deletions
@@ -1,5 +1,10 @@ 2009-03-02 Guillem Jover <guillem@debian.org> + * scripts/t/900_update_alternatives.t: Do not use $srcdir for t.tmp, + it's actually located in builddir. + +2009-03-02 Guillem Jover <guillem@debian.org> + * scripts/update-alternatives.pl (load): Print an actual error on open instead of an empty string. diff --git a/scripts/t/900_update_alternatives.t b/scripts/t/900_update_alternatives.t index e2a61bfee..da4ba8478 100644 --- a/scripts/t/900_update_alternatives.t +++ b/scripts/t/900_update_alternatives.t @@ -8,9 +8,9 @@ use strict; use warnings; my $srcdir = $ENV{srcdir} || '.'; -my $admindir = File::Spec->rel2abs("$srcdir/t.tmp/ua/admindir"), -my $altdir = File::Spec->rel2abs("$srcdir/t.tmp/ua/alternatives"); -my $bindir = File::Spec->rel2abs("$srcdir/t.tmp/ua/bin"); +my $admindir = File::Spec->rel2abs("t.tmp/ua/admindir"), +my $altdir = File::Spec->rel2abs("t.tmp/ua/alternatives"); +my $bindir = File::Spec->rel2abs("t.tmp/ua/bin"); # XXX: switch to version without .pl my @ua = ("$srcdir/update-alternatives.pl", "--log", "/dev/null", "--quiet", "--admindir", "$admindir", "--altdir", "$altdir"); @@ -56,7 +56,7 @@ plan tests => (4 * ($nb_slaves + 1) + 2) * 24 # number of check_choices + 60; # rest sub cleanup { - system("rm -rf $srcdir/t.tmp/ua && mkdir -p $admindir && mkdir -p $altdir"); + system("rm -rf t.tmp/ua && mkdir -p $admindir && mkdir -p $altdir"); system("mkdir -p $bindir/more"); } |