]> xenbits.xensource.com Git - libvirt.git/commitdiff
cpu-parse: Move model name detection to new script
authorTim Wiederhake <twiederh@redhat.com>
Tue, 15 Dec 2020 16:25:04 +0000 (17:25 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 18 Dec 2020 22:20:32 +0000 (23:20 +0100)
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/cputestdata/cpu-gather.py
tests/cputestdata/cpu-parse.sh

index 7c51a47353abcc30e03726a53603c81daa8a183e..0b1019456c50225d57f7f371d120cf1a13ba223f 100755 (executable)
@@ -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),
index fa4344b6ad04e0c4a1b601704fb798f256773b16..5b8e57e427b41b5b31b92023484721b71b80b794 100755 (executable)
@@ -7,8 +7,6 @@ fi
 
 data=`cat`
 
-model=`sed -ne '/^model name[  ]*:/ {s/^[^:]*: \(.*\)/\1/p; q}' <<<"$data"`
-
 fname=`sed -e 's/^ *//;
                s/ *$//;
                s/[ -]\+ \+/ /g;