From 0ff824061ff5a58d25e64453dd0abc800d8db933 Mon Sep 17 00:00:00 2001 From: Jonathan Herman Date: Fri, 28 Sep 2012 11:17:43 -0400 Subject: Experiments can specify a required kernel name for running. --- experiment/litmus_util.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'experiment/litmus_util.py') diff --git a/experiment/litmus_util.py b/experiment/litmus_util.py index 114f4c9..cde0bca 100644 --- a/experiment/litmus_util.py +++ b/experiment/litmus_util.py @@ -39,6 +39,9 @@ def switch_scheduler(switch_to_in): if switch_to != cur_plugin: raise Exception("Could not switch to plugin: %s" % switch_to) +def uname_matches(reg): + data = subprocess.check_output(["uname", "-r"]) + return bool( re.match(reg, data) ) def is_executable(fname): """Return whether the file passed in is executable""" -- cgit v1.2.2