[libvirt PATCH 18/29] cpu-parse: Move model name detection to new script

Tim Wiederhake twiederh at redhat.com
Tue Dec 15 16:25:04 UTC 2020


Signed-off-by: Tim Wiederhake <twiederh at redhat.com>
---
 tests/cputestdata/cpu-gather.py | 1 +
 tests/cputestdata/cpu-parse.sh  | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/cputestdata/cpu-gather.py b/tests/cputestdata/cpu-gather.py
index 7c51a47353..0b1019456c 100755
--- a/tests/cputestdata/cpu-gather.py
+++ b/tests/cputestdata/cpu-gather.py
@@ -196,6 +196,7 @@ def parse(args):
     data = json.load(sys.stdin)
 
     os.environ["CPU_GATHER_PY"] = "true"
+    os.environ["model"] = data["name"]
     output = subprocess.check_output(
         "./cpu-parse.sh",
         input=output_to_text(data),
diff --git a/tests/cputestdata/cpu-parse.sh b/tests/cputestdata/cpu-parse.sh
index fa4344b6ad..5b8e57e427 100755
--- a/tests/cputestdata/cpu-parse.sh
+++ b/tests/cputestdata/cpu-parse.sh
@@ -7,8 +7,6 @@ fi
 
 data=`cat`
 
-model=`sed -ne '/^model name[ 	]*:/ {s/^[^:]*: \(.*\)/\1/p; q}' <<<"$data"`
-
 fname=`sed -e 's/^ *//;
                s/ *$//;
                s/[ -]\+ \+/ /g;
-- 
2.26.2




More information about the libvir-list mailing list