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 <dwallacelf@gmail.com>
This commit is contained in:
parent
7301abe9ba
commit
85ce93160f
3
src/vpp-api/python/pyproject.toml
Normal file
3
src/vpp-api/python/pyproject.toml
Normal file
@ -0,0 +1,3 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=61.0"]
|
||||
build-backend = "setuptools.build_meta"
|
@ -166,6 +166,17 @@ def _is_distro_ubuntu2204():
|
||||
is_distro_ubuntu2204 = _is_distro_ubuntu2204()
|
||||
|
||||
|
||||
def _is_distro_ubuntu2404():
|
||||
with open("/etc/os-release") as f:
|
||||
for line in f.readlines():
|
||||
if "noble" in line:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
is_distro_ubuntu2404 = _is_distro_ubuntu2404()
|
||||
|
||||
|
||||
def _is_distro_debian11():
|
||||
with open("/etc/os-release") as f:
|
||||
for line in f.readlines():
|
||||
@ -177,14 +188,6 @@ def _is_distro_debian11():
|
||||
is_distro_debian11 = _is_distro_debian11()
|
||||
|
||||
|
||||
def _is_distro_ubuntu2204():
|
||||
with open("/etc/os-release") as f:
|
||||
for line in f.readlines():
|
||||
if "jammy" in line:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
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]"
|
||||
|
@ -37,7 +37,7 @@ class TestJsonApiTrace(VppAsfTestCase):
|
||||
found = True
|
||||
break
|
||||
self.assertTrue(found)
|
||||
self.assertEquals(o["_msgname"], "show_version")
|
||||
self.assertEqual(o["_msgname"], "show_version")
|
||||
|
||||
def test_json_api_trace_replay(self):
|
||||
fname = "/tmp/create_loop.json"
|
||||
|
@ -7,7 +7,7 @@ import subprocess
|
||||
import signal
|
||||
import glob
|
||||
from config import config
|
||||
from asfframework import VppAsfTestCase, VppTestRunner, Worker
|
||||
from asfframework import VppAsfTestCase, VppTestRunner, Worker, tag_fixme_ubuntu2404
|
||||
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath
|
||||
|
||||
iperf3 = "/usr/bin/iperf3"
|
||||
@ -311,6 +311,7 @@ class VCLTestCase(VppAsfTestCase):
|
||||
self.assert_equal(worker_client.result, 0, "Binary test return code")
|
||||
|
||||
|
||||
@tag_fixme_ubuntu2404
|
||||
class LDPCutThruTestCase(VCLTestCase):
|
||||
"""LDP Cut Thru Tests"""
|
||||
|
||||
@ -970,6 +971,7 @@ class VCLThruHostStackNsock(VCLTestCase):
|
||||
)
|
||||
|
||||
|
||||
@tag_fixme_ubuntu2404
|
||||
class LDPThruHostStackIperf(VCLTestCase):
|
||||
"""LDP Thru Host Stack Iperf"""
|
||||
|
||||
@ -1017,6 +1019,7 @@ class LDPThruHostStackIperf(VCLTestCase):
|
||||
)
|
||||
|
||||
|
||||
@tag_fixme_ubuntu2404
|
||||
class LDPThruHostStackIperfUdp(VCLTestCase):
|
||||
"""LDP Thru Host Stack Iperf UDP"""
|
||||
|
||||
@ -1062,6 +1065,7 @@ class LDPThruHostStackIperfUdp(VCLTestCase):
|
||||
)
|
||||
|
||||
|
||||
@tag_fixme_ubuntu2404
|
||||
class LDPIpv6CutThruTestCase(VCLTestCase):
|
||||
"""LDP IPv6 Cut Thru Tests"""
|
||||
|
||||
|
590
test/patches/scapy-2.4.5/scapy-python312.patch
Normal file
590
test/patches/scapy-2.4.5/scapy-python312.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -23,8 +23,7 @@ from scapy.utils import long_converter
|
||||
from framework import VppTestCase
|
||||
from asfframework import (
|
||||
tag_fixme_vpp_workers,
|
||||
is_distro_ubuntu2204,
|
||||
is_distro_debian11,
|
||||
tag_fixme_ubuntu2404,
|
||||
VppTestRunner,
|
||||
)
|
||||
from vpp_ikev2 import Profile, IDType, AuthMethod
|
||||
@ -2323,6 +2322,7 @@ class TestResponderRekey(TestResponderPsk):
|
||||
self.assertEqual(r[0].sa.stats.n_rekey_req, 1)
|
||||
|
||||
|
||||
@tag_fixme_ubuntu2404
|
||||
class TestResponderRekeyRepeat(TestResponderRekey):
|
||||
"""test ikev2 responder - rekey repeat"""
|
||||
|
||||
@ -2357,6 +2357,7 @@ class TestResponderRekeyKEX(TestResponderRekey):
|
||||
vpp_worker_count = 2
|
||||
|
||||
|
||||
@tag_fixme_ubuntu2404
|
||||
class TestResponderRekeyRepeatKEX(TestResponderRekeyRepeat):
|
||||
"""test ikev2 responder - rekey repeat with key exchange"""
|
||||
|
||||
|
@ -274,7 +274,7 @@ class TestVlibFrameLeak(VppTestCase):
|
||||
|
||||
rx = self.pg0.get_capture(1)
|
||||
|
||||
self.assertEquals(len(rx), 1)
|
||||
self.assertEqual(len(rx), 1)
|
||||
rx = rx[0]
|
||||
ether = rx[Ether]
|
||||
ipv4 = rx[IP]
|
||||
@ -305,7 +305,7 @@ class TestVlibFrameLeak(VppTestCase):
|
||||
|
||||
rx = self.pg0.get_capture(1)
|
||||
|
||||
self.assertEquals(len(rx), 1)
|
||||
self.assertEqual(len(rx), 1)
|
||||
rx = rx[0]
|
||||
ether = rx[Ether]
|
||||
ipv4 = rx[IP]
|
||||
|
Loading…
x
Reference in New Issue
Block a user