From 29584c4a4883cd8b86ce35408148873b1f069057 Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Tue, 15 Dec 2020 17:25:04 +0100 Subject: [PATCH] cpu-parse: Move model name detection to new script Signed-off-by: Tim Wiederhake Reviewed-by: Michal Privoznik --- 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;