mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
cputest: Rename cpu-convert.py script as cpu-cpuid.py
The new script is going to be more general and the original functionality can be requested by "cpu-cpuid.py convert". Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
ac49ce42ef
commit
72c44a15c9
@ -222,7 +222,7 @@ def propAdd(props, feature, value):
|
|||||||
props[name] = value
|
props[name] = value
|
||||||
|
|
||||||
|
|
||||||
for path in sys.argv[1:]:
|
def convert(path):
|
||||||
props, cpuid = parseFeatureWords(path)
|
props, cpuid = parseFeatureWords(path)
|
||||||
|
|
||||||
for feature in cpuidMap:
|
for feature in cpuidMap:
|
||||||
@ -247,3 +247,18 @@ for path in sys.argv[1:]:
|
|||||||
"id": "model-expansion"},
|
"id": "model-expansion"},
|
||||||
f, indent = 2, separators = (',', ': '))
|
f, indent = 2, separators = (',', ': '))
|
||||||
f.write("\n")
|
f.write("\n")
|
||||||
|
|
||||||
|
|
||||||
|
if len(sys.argv) < 3:
|
||||||
|
print "Usage: %s convert json_file..." % sys.argv[0]
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
action = sys.argv[1]
|
||||||
|
args = sys.argv[2:]
|
||||||
|
|
||||||
|
if action == "convert":
|
||||||
|
for path in args:
|
||||||
|
convert(path)
|
||||||
|
else:
|
||||||
|
print "Unknown action: " + action
|
||||||
|
sys.exit(1)
|
@ -53,7 +53,7 @@ json <<<"$data" >$fname.json
|
|||||||
if [[ -s $fname.json ]]; then
|
if [[ -s $fname.json ]]; then
|
||||||
echo $fname.json
|
echo $fname.json
|
||||||
if ! grep -q model-expansion $fname.json; then
|
if ! grep -q model-expansion $fname.json; then
|
||||||
$(dirname $0)/cpu-convert.py $fname.json
|
$(dirname $0)/cpu-cpuid.py convert $fname.json
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
rm $fname.json
|
rm $fname.json
|
||||||
|
Loading…
Reference in New Issue
Block a user