New 'labman' tool

Harald Seiler hws at denx.de
Mon Apr 20 13:39:10 CEST 2020


Hello Heiko,

On Mon, 2020-04-20 at 13:28 +0200, Heiko Schocher wrote:
> Hello Stefano,
> 
> Am 20.04.2020 um 13:03 schrieb Heiko Schocher:
[...]
> 
> Forgot an example:
> 
> class Lab1Lab(connector.SSHConnector, linux.Bash, linux.Lab, linux.Builder):
> [...]
> 
>      def init(self):
>          # check if nfs server is running, if not start it
>          ret = self.exec("systemctl", "status", "nfs-client.target")
>          if ret[0] != 0:
>              ret = self.exec0("sudo", "systemctl", "start", "nfs-client.target")
>          # check if tftp server is running, if not start it
>          ret = self.exec("systemctl", "status", "tftp.socket")
>          if ret[0] != 0:
>              ret = self.exec0("sudo", "systemctl", "start", "tftp.socket")

This 'check if a systemd service is running and if not, start it' would
make a good testcase for tbot_contrib!  Ideally, you can pass in a list of
units which need to be running.  Would you mind sending a patch?

> bye,
> Heiko
-- 
Harald



More information about the tbot mailing list