diff options
author | Ludovic Courtès <ludo@gnu.org> | 2010-10-10 22:37:45 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2010-10-10 22:37:45 +0000 |
commit | 4695f790cf44976b3f920bac38e046a82fceae5b (patch) | |
tree | 87871dabcd94acc6dfe4e3c2cfabeb210250f09d /lib/test-driver/Machine.pm | |
parent | 26bae39a1f25d1e92f8e3acc2b3130035e913e8d (diff) | |
download | nixpkgs-4695f790cf44976b3f920bac38e046a82fceae5b.tar nixpkgs-4695f790cf44976b3f920bac38e046a82fceae5b.tar.gz nixpkgs-4695f790cf44976b3f920bac38e046a82fceae5b.tar.bz2 nixpkgs-4695f790cf44976b3f920bac38e046a82fceae5b.tar.lz nixpkgs-4695f790cf44976b3f920bac38e046a82fceae5b.tar.xz nixpkgs-4695f790cf44976b3f920bac38e046a82fceae5b.tar.zst nixpkgs-4695f790cf44976b3f920bac38e046a82fceae5b.zip |
test-driver: Add `startJob' method.
svn path=/nixos/trunk/; revision=24210
Diffstat (limited to 'lib/test-driver/Machine.pm')
-rw-r--r-- | lib/test-driver/Machine.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/test-driver/Machine.pm b/lib/test-driver/Machine.pm index 9f5971d70a1..daa40f78f9f 100644 --- a/lib/test-driver/Machine.pm +++ b/lib/test-driver/Machine.pm @@ -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) = @_; |