cpu-parse: Move model name detection to new script

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Tim Wiederhake 2020-12-15 17:25:04 +01:00 committed by Michal Privoznik
parent 2933047c02
commit 29584c4a48
2 changed files with 1 additions and 2 deletions

View File

@ -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),

View File

@ -7,8 +7,6 @@ fi
data=`cat`
model=`sed -ne '/^model name[ ]*:/ {s/^[^:]*: \(.*\)/\1/p; q}' <<<"$data"`
fname=`sed -e 's/^ *//;
s/ *$//;
s/[ -]\+ \+/ /g;