[PATCH 2/3] test: py: network: skip test if tftp command is missing

Ahmad Fatoum a.fatoum at barebox.org
Mon Oct 20 11:28:37 PDT 2025


The test depends on the tftp command being available, so skip it if this
is not the case.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 test/py/test_network.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/test/py/test_network.py b/test/py/test_network.py
index afaa259e2496..28efcc02e44d 100644
--- a/test/py/test_network.py
+++ b/test/py/test_network.py
@@ -5,6 +5,7 @@ import socket
 import threading
 import re
 import warnings
+from .helper import skip_disabled
 
 # Setting the port to zero causes bind to choose a random ephermal port
 TFTP_TEST_PORT = 0
@@ -64,7 +65,9 @@ def tftp_conversation(barebox, barebox_interface, guestaddr):
         barebox.run_check("ifdown eth0")
 
 
-def test_barebox_network(barebox, env):
+def test_barebox_network(barebox, barebox_config, env):
+    skip_disabled(barebox_config, "CONFIG_CMD_TFTP")
+
     # on DUTs without network feature, this is expected to fail
     # set xfail_strict=True to enforce specifying the network feature if available
     if not 'network' in env.get_target_features():
-- 
2.47.3




More information about the barebox mailing list