As per the discussion in
https://code.launchpad.net/~athos/ubuntu/+source/openipmi/+git/openipmi/+merge/507623,
the following script could be a good start point here, whenever the
contents of the linked Merge Proposal land in the package:

```
#!/bin/bash

set -eu

VM_NAME=openipmi-systemd-test
lxc delete -f $VM_NAME || true
lxc init --vm ubuntu-daily:stonking $VM_NAME
lxc config set $VM_NAME raw.qemu -- "-device ipmi-bmc-sim,id=bmc0 -device 
isa-ipmi-kcs,bmc=bmc0,ioport=0xca2"
lxc start $VM_NAME
# wait until it is ready:
while lxc info $VM_NAME | grep -q 'Processes: -1'; do
  sleep 10
  echo setting VM up...
done
# wait a bit more for networking to be available
sleep 10
lxc exec $VM_NAME -- apt update
lxc exec $VM_NAME -- add-apt-repository -y ppa:athos/openipmi
lxc exec $VM_NAME -- apt install -y openipmi ipmitool
lxc exec $VM_NAME -- modprobe ipmi_devintf
lxc exec $VM_NAME -- modprobe ipmi_si
lxc exec $VM_NAME -- test -e /dev/ipmi0
echo "starting service..."
lxc exec $VM_NAME -- systemctl start openipmi.service
lxc exec $VM_NAME -- ipmitool -I open mc info | grep -q 'Device Available'
echo "stopping service..."
lxc exec $VM_NAME -- systemctl stop openipmi.service
lxc exec $VM_NAME -- ipmitool -I open mc info > /dev/null 2>&1 && echo Fail && 
exit 1 || echo Success
echo "cleaning up..."
lxc delete -f $VM_NAME
```

** Changed in: openipmi (Ubuntu)
   Importance: Wishlist => Medium

** Tags added: server-todo

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1679354

Title:
  Missing dep8 tests

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openipmi/+bug/1679354/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to