From 10af66f23cd57d37da23d239a8d43b2b22d4c7a3 Mon Sep 17 00:00:00 2001 From: Gyorgy Sarvari Date: Sun, 19 Oct 2025 14:20:53 +0200 Subject: [PATCH] python3-betamax: fix ptests A number of tests require internet access - set a valid DNS in resolv.conf so the tests don't fail. Signed-off-by: Gyorgy Sarvari Signed-off-by: Khem Raj --- .../recipes-devtools/python/python3-betamax/run-ptest | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meta-python/recipes-devtools/python/python3-betamax/run-ptest b/meta-python/recipes-devtools/python/python3-betamax/run-ptest index 8d2017d39c..531af4d015 100644 --- a/meta-python/recipes-devtools/python/python3-betamax/run-ptest +++ b/meta-python/recipes-devtools/python/python3-betamax/run-ptest @@ -1,3 +1,11 @@ #!/bin/sh + + +if ! nslookup httpbin.org >/dev/null 2>&1 ; then + trap 'mv /etc/resolv.conf.bak /etc/resolv.conf' INT EXIT + mv /etc/resolv.conf /etc/resolv.conf.bak + echo "nameserver 8.8.8.8" > /etc/resolv.conf +fi + pytest --automake