test-driver: Add `startJob' method.

svn path=/nixos/trunk/; revision=24210
This commit is contained in:
Ludovic Courtès 2010-10-10 22:37:45 +00:00
parent 26bae39a1f
commit 4695f790cf
1 changed files with 6 additions and 0 deletions

View File

@ -330,6 +330,12 @@ sub waitForFile {
}
}
sub startJob {
my ($self, $jobName) = @_;
$self->execute("initctl start $jobName");
my ($status, $out) = $self->execute("initctl status $jobName");
die "failed to start $jobName" unless $out =~ /start\/running/;
}
sub stopJob {
my ($self, $jobName) = @_;