From ff2177c68252c80e75c2e0fbc4d40e8193d4cb36 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov Date: Tue, 14 May 2019 11:56:46 +0000 Subject: Create package for test-related code. --- t/924903.t | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 't') 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 @@ use strict; use warnings; use Test::More tests => 3; -use File::Path qw(remove_tree); -use File::Copy::Recursive qw(dircopy); use File::stat; -use Cwd; - -my $root = Cwd::cwd; -$ENV{PATH} = "$root:$ENV{PATH}"; -$ENV{DH_AUTOSCRIPTDIR} = $root; - -sub prepare_source_package { - die '$0 does not match expected format' - unless ($0 =~ m#t/([0-9]+)\.t#); - my $number = $1; - my $srcdir = (-d "t/base/${number}") ? "t/base/${number}" : "t/base/default"; - my $testdir = "t/${number}"; - dircopy($srcdir, $testdir); - chdir($testdir); - return $testdir; -} - -sub system_ok { - ok(system(@_) == 0, "external command @_"); -} - -prepare_source_package(); +use T; system_ok('dh_runit', 'debian/test.runscript', 'name=test'); my $path = 'debian/dh-runit-test/var/lib/runit/supervise/test'; -- cgit v1.2.3