Skip to content

Commit

Permalink
Fixed unresolved changes in LSCPU
Browse files Browse the repository at this point in the history
  • Loading branch information
r-dailey committed Dec 7, 2024
1 parent 0b61d30 commit 36e4791
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lisa/tools/lscpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,16 +445,14 @@ def calculate_vcpu_count(self, force_run: bool = False) -> int:

def get_cpu_type(self, force_run: bool = False) -> CpuType:
result = self.run("-n hw.model", force_run=force_run).stdout.strip()
if "AMD" in result.stdout:
if "AMD" in result:
return CpuType.AMD
elif "Intel" in result.stdout:
elif "Intel" in result:
return CpuType.Intel
elif "ARM" in result.stdout or "aarch64" in result.stdout:
elif "ARM" in result or "aarch64" in result:
return CpuType.ARM
else:
raise LisaException(
f"Unknow cpu type. The output of lscpu is {result.stdout}"
)
raise LisaException(f"Unknow cpu type. The output of lscpu is {result}")


class VMWareESXiLscpu(Lscpu):
Expand Down

0 comments on commit 36e4791

Please sign in to comment.