summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorDmitry Bogatov <KAction@debian.org>2019-05-14 11:56:46 +0000
committerDmitry Bogatov <KAction@debian.org>2019-05-14 11:56:46 +0000
commitff2177c68252c80e75c2e0fbc4d40e8193d4cb36 (patch)
treefe5c4e7b5e8d8f9081c7438ee4c0e03415c6c14d /t
parent365f18bb70df268de5933176e55f4315295b62c7 (diff)
Create package for test-related code.
Diffstat (limited to 't')
-rw-r--r--t/924903.t25
1 files changed, 1 insertions, 24 deletions
diff --git a/t/924903.t b/t/924903.t
index fa70834..710ea39 100644
--- a/t/924903.t
+++ b/t/924903.t
@@ -2,31 +2,8 @@
2use strict; 2use strict;
3use warnings; 3use warnings;
4use Test::More tests => 3; 4use Test::More tests => 3;
5use File::Path qw(remove_tree);
6use File::Copy::Recursive qw(dircopy);
7use File::stat; 5use File::stat;
8use Cwd; 6use T;
9
10my $root = Cwd::cwd;
11$ENV{PATH} = "$root:$ENV{PATH}";
12$ENV{DH_AUTOSCRIPTDIR} = $root;
13
14sub prepare_source_package {
15 die '$0 does not match expected format'
16 unless ($0 =~ m#t/([0-9]+)\.t#);
17 my $number = $1;
18 my $srcdir = (-d "t/base/${number}") ? "t/base/${number}" : "t/base/default";
19 my $testdir = "t/${number}";
20 dircopy($srcdir, $testdir);
21 chdir($testdir);
22 return $testdir;
23}
24
25sub system_ok {
26 ok(system(@_) == 0, "external command @_");
27}
28
29prepare_source_package();
30 7
31system_ok('dh_runit', 'debian/test.runscript', 'name=test'); 8system_ok('dh_runit', 'debian/test.runscript', 'name=test');
32my $path = 'debian/dh-runit-test/var/lib/runit/supervise/test'; 9my $path = 'debian/dh-runit-test/var/lib/runit/supervise/test';