[debhelper-devel] [debhelper] 10/30: Test::DH: Support extra per-test template files
Niels Thykier
nthykier at moszumanska.debian.org
Mon Jul 3 14:40:37 UTC 2017
This is an automated email from the git hooks/post-receive script.
nthykier pushed a commit to branch master
in repository debhelper.
commit 376bedb5b198d37d4aad3240a5b6519c9bb2178f
Author: Niels Thykier <niels at thykier.net>
Date: Sun Jul 2 11:38:50 2017 +0000
Test::DH: Support extra per-test template files
Signed-off-by: Niels Thykier <niels at thykier.net>
---
t/Test/DH.pm | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/t/Test/DH.pm b/t/Test/DH.pm
index 8e710d2..82398f6 100644
--- a/t/Test/DH.pm
+++ b/t/Test/DH.pm
@@ -42,6 +42,7 @@ our @EXPORT = qw(
our ($TEST_DH_COMPAT, $ROOT_OK, $ROOT_CMD);
my $START_DIR = cwd();
+my $TEST_DIR;
sub run_dh_tool {
my (@cmd) = @_;
@@ -104,6 +105,14 @@ sub _prepare_test_root {
for my $file (@files) {
install_file($file, "${dir}/${file}");
}
+ if (@::TEST_DH_EXTRA_TEMPLATE_FILES) {
+ my $test_dir = ($TEST_DIR //= dirname($0));
+ for my $file (@::TEST_DH_EXTRA_TEMPLATE_FILES) {
+ my $install_dir = dirname($file);
+ install_dir($install_dir);
+ install_file("${test_dir}/${file}", "${dir}/${file}");
+ }
+ }
}
return $dir;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git
More information about the debhelper-devel
mailing list