tests: Add platform handling for FreeBSD 61/40561/3
authorTom Jones <[email protected]>
Wed, 7 Feb 2024 13:27:44 +0000 (13:27 +0000)
committerOle Tr�an <[email protected]>
Tue, 26 Mar 2024 15:14:29 +0000 (15:14 +0000)
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 <[email protected]>
test/asf/test_node_variants.py

index c0c7cc3..80a18eb 100644 (file)
@@ -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()