Skip to content

Commit

Permalink
Skip testing for distro which not support by hibernation_setup_tool (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
LiliDeng authored Apr 25, 2022
1 parent c006f27 commit f671474
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion microsoft/testsuites/power/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@

from lisa import Environment, Logger, RemoteNode
from lisa.features import StartStop
from lisa.operating_system import Redhat, Suse, Ubuntu
from lisa.tools import Fio, HibernationSetup, Iperf3, Kill, Lscpu
from lisa.util import LisaException
from lisa.util import LisaException, SkippedException
from lisa.util.perf_timer import create_timer
from lisa.util.shell import wait_tcp_port_ready


def verify_hibernation(node: RemoteNode, log: Logger) -> None:
if (
(isinstance(node.os, Redhat) and node.os.information.version < "8.3.0")
or (isinstance(node.os, Ubuntu) and node.os.information.version < "18.4.0")
or (isinstance(node.os, Suse) and node.os.information.version < "15.3.0")
):
raise SkippedException(
f"hibernation setup tool doesn't support current distro {node.os.name}, "
f"version {node.os.information.version}"
)
node_nic = node.nics
lower_nics_before_hibernation = node_nic.get_lower_nics()
upper_nics_before_hibernation = node_nic.get_upper_nics()
Expand Down

0 comments on commit f671474

Please sign in to comment.