summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2017-07-02 16:06:32 +0000
committerNiels Thykier <niels@thykier.net>2017-07-03 14:34:26 +0000
commitfe310ea002955f2fd8300e9367199b867ba58247 (patch)
tree528928b5d174c56b87ba3836fe5a9dd7dd0277dc
parent60cddb2082c887f3ee161364b71331a0005d796d (diff)
downloaddebhelper-fe310ea002955f2fd8300e9367199b867ba58247.tar.gz
Test::DH: Support alternative fixture dir
Signed-off-by: Niels Thykier <niels@thykier.net>
-rw-r--r--t/Test/DH.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/t/Test/DH.pm b/t/Test/DH.pm
index 0f728508..0cf1e39f 100644
--- a/t/Test/DH.pm
+++ b/t/Test/DH.pm
@@ -116,12 +116,14 @@ sub _prepare_test_root {
}
if (@::TEST_DH_EXTRA_TEMPLATE_FILES) {
my $test_dir = ($TEST_DIR //= dirname($0));
+ my $fixture_dir = $::TEST_DH_FIXTURE_DIR // '.';
+ my $actual_dir = "$test_dir/$fixture_dir";
for my $file (@::TEST_DH_EXTRA_TEMPLATE_FILES) {
if (index($file, '/') > -1) {
my $install_dir = dirname($file);
install_dir($install_dir);
}
- install_file("${test_dir}/${file}", "${dir}/${file}");
+ install_file("${actual_dir}/${file}", "${dir}/${file}");
}
}
}