From 85ce93160fa71c5e6fb9140704c07e6d8989889d Mon Sep 17 00:00:00 2001 From: Dave Wallace Date: Mon, 19 Aug 2024 18:47:55 -0400 Subject: tests: fix make test python issues on ubuntu 24.04 - add patch to scapy to use latest six module instead of the old scapy specific six module which fails to import moves sub-module on python 3.12 - fix warning for deprecated legacy editable install of vpp_papi - skip failing testcases on ubuntu-24.04 Type: test Change-Id: Idc1a008c6e45ba69caa50c2e245012eb05effed7 Signed-off-by: Dave Wallace --- test/asf/asfframework.py | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'test/asf/asfframework.py') diff --git a/test/asf/asfframework.py b/test/asf/asfframework.py index 0228af82642..bd1b45c6476 100644 --- a/test/asf/asfframework.py +++ b/test/asf/asfframework.py @@ -166,25 +166,28 @@ def _is_distro_ubuntu2204(): is_distro_ubuntu2204 = _is_distro_ubuntu2204() -def _is_distro_debian11(): +def _is_distro_ubuntu2404(): with open("/etc/os-release") as f: for line in f.readlines(): - if "bullseye" in line: + if "noble" in line: return True return False -is_distro_debian11 = _is_distro_debian11() +is_distro_ubuntu2404 = _is_distro_ubuntu2404() -def _is_distro_ubuntu2204(): +def _is_distro_debian11(): with open("/etc/os-release") as f: for line in f.readlines(): - if "jammy" in line: + if "bullseye" in line: return True return False +is_distro_debian11 = _is_distro_debian11() + + class KeepAliveReporter(object): """ Singleton object which reports test start to parent process @@ -236,6 +239,8 @@ class TestCaseTag(Enum): FIXME_DEBIAN11 = 5 # marks suites broken on debug vpp image FIXME_VPP_DEBUG = 6 + # marks suites broken on Ubuntu-24.04 + FIXME_UBUNTU2404 = 7 def create_tag_decorator(e): @@ -255,6 +260,7 @@ tag_fixme_asan = create_tag_decorator(TestCaseTag.FIXME_ASAN) tag_fixme_ubuntu2204 = create_tag_decorator(TestCaseTag.FIXME_UBUNTU2204) tag_fixme_debian11 = create_tag_decorator(TestCaseTag.FIXME_DEBIAN11) tag_fixme_vpp_debug = create_tag_decorator(TestCaseTag.FIXME_VPP_DEBUG) +tag_fixme_ubuntu2404 = create_tag_decorator(TestCaseTag.FIXME_UBUNTU2404) class DummyVpp: @@ -322,6 +328,12 @@ class VppAsfTestCase(CPUInterface, unittest.TestCase): if cls.has_tag(TestCaseTag.FIXME_UBUNTU2204) and is_distro_ubuntu2204 == True: cls = unittest.skip("Skipping @tag_fixme_ubuntu2204 tests")(cls) + @classmethod + def skip_fixme_ubuntu2404(cls): + """if @tag_fixme_ubuntu2404 & is Ubuntu24.04 - mark for skip""" + if cls.has_tag(TestCaseTag.FIXME_UBUNTU2404) and is_distro_ubuntu2404 == True: + cls = unittest.skip("Skipping @tag_fixme_ubuntu2404 tests")(cls) + @classmethod def instance(cls): """Return the instance of this testcase""" @@ -1376,6 +1388,13 @@ class VppTestResult(unittest.TestResult): test_title = colorize(f"FIXME with Ubuntu 22.04: {test_title}", RED) test.skip_fixme_ubuntu2204() + if ( + test.has_tag(TestCaseTag.FIXME_UBUNTU2404) + and is_distro_ubuntu2404 == True + ): + test_title = colorize(f"FIXME with Ubuntu 24.04: {test_title}", RED) + test.skip_fixme_ubuntu2404() + if hasattr(test, "vpp_worker_count"): if test.vpp_worker_count == 0: test_title += " [main thread only]" -- cgit 1.2.3-korg