aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Jones <thj@freebsd.org>2024-02-07 13:27:44 +0000
committerOle Tr�an <otroan@employees.org>2024-03-26 15:14:29 +0000
commite49e75a4b5ff10063fd9e1681375f193e0e49ff0 (patch)
treefdf12c70bb4530d08b1adcc0265a8b99cb1cad14
parentebe3a11ca7a767f1a9051e8875653d1dd8532231 (diff)
tests: Add platform handling for FreeBSD
FreeBSD doesn't have an easy mechanism to discover CPU features currently. For tests declare we don't support anything we are asked about. Add the FreeBSD spelling of amd64 while we are here. Type: improvement Change-Id: I3eb5db856ee5cbc71250e47eee619e2f620de33a Signed-off-by: Tom Jones <thj@freebsd.org>
-rw-r--r--test/asf/test_node_variants.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/asf/test_node_variants.py b/test/asf/test_node_variants.py
index c0c7cc35658..80a18eb055a 100644
--- a/test/asf/test_node_variants.py
+++ b/test/asf/test_node_variants.py
@@ -6,10 +6,15 @@ from asfframework import VppAsfTestCase
def checkX86():
- return platform.machine() in ["x86_64", "AMD64"]
+ return platform.machine() in ["x86_64", "AMD64", "amd64"]
def skipVariant(variant):
+ # TODO: We don't have cpu feature detection on FreeBSD yet, so always return
+ # that we don't have the requested variant.
+ if platform.uname().system == "FreeBSD":
+ return False
+
with open("/proc/cpuinfo") as f:
cpuinfo = f.read()