summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/runner.py38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/runner.py b/lib/runner.py
index 3290913..a8c2fd1 100644
--- a/lib/runner.py
+++ b/lib/runner.py
@@ -522,6 +522,24 @@ class KRATOS:
max_overflow,
)
+ def get_nfpvalues(self) -> list:
+ """
+ Return Kratos "make nfpvalues" output.
+
+ Returns a dict.
+ """
+ command = ["make", "nfpvalues"]
+ logger.debug(f"Getting nfpvalues: {' '.join(command)}")
+ res = subprocess.run(
+ command,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ universal_newlines=True,
+ )
+ if res.returncode != 0:
+ raise RuntimeError(f"make nfpvalues Failure. command = {command}")
+ return json.loads(res.stdout)
+
class Multipass:
def __init__(self, name, opts=list()):
@@ -655,6 +673,26 @@ class Multipass:
raise RuntimeError(f"make info Failure. command = {command}")
return res.stdout.split("\n")
+ def get_nfpvalues(self, app, opts=list()) -> list:
+ """
+ Return multipass "make nfpvalues" output.
+
+ Returns a dict.
+ """
+ command = ["make", f"arch={self.name}", f"app={app}", "nfpvalues"]
+ command.extend(self.opts)
+ command.extend(opts)
+ logger.debug(f"Getting nfpvalues: {' '.join(command)}")
+ res = subprocess.run(
+ command,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ universal_newlines=True,
+ )
+ if res.returncode != 0:
+ raise RuntimeError(f"make nfpvalues Failure. command = {command}")
+ return json.loads(res.stdout)
+
def _cached_info(self, opts=list()) -> list:
if len(opts):
return self.get_info(opts)