From: Tom Jones Date: Wed, 7 Feb 2024 13:27:44 +0000 (+0000) Subject: tests: Add platform handling for FreeBSD X-Git-Tag: v24.10-rc0~147 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F61%2F40561%2F3;p=vpp.git 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 --- 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()