From c71d61037e5375af02b022917f2fc6d130f41313 Mon Sep 17 00:00:00 2001 From: Gyorgy Sarvari Date: Mon, 27 Oct 2025 21:10:14 +0100 Subject: python3-scapy: fix ptests 1. Enable network access during tests by setting a nameserver 2. Add missing tshark dependency 3. Install missing test files Signed-off-by: Gyorgy Sarvari --- meta-networking/recipes-devtools/python/python3-scapy/run-ptest | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'meta-networking/recipes-devtools/python/python3-scapy') diff --git a/meta-networking/recipes-devtools/python/python3-scapy/run-ptest b/meta-networking/recipes-devtools/python/python3-scapy/run-ptest index 797d8ecf78..847b69af94 100644 --- a/meta-networking/recipes-devtools/python/python3-scapy/run-ptest +++ b/meta-networking/recipes-devtools/python/python3-scapy/run-ptest @@ -1,4 +1,11 @@ #!/bin/sh + +if ! nslookup example.com; then + mv /etc/resolv.conf /etc/resolv.conf.bak + echo "nameserver 8.8.8.8" > /etc/resolv.conf + trap "mv /etc/resolv.conf.bak /etc/resolv.conf" INT EXIT +fi + UTscapy3 -t regression.uts -f text -l -C \ -o @PTEST_PATH@/scapy_ptest_$(date +%Y%m%d-%H%M%S).log \ 2>&1 | sed -e 's/^passed None/PASS:/' -e 's/^failed None/FAIL:/' -- cgit v1.2.3-54-g00ecf