summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/py/tests/test_dfu.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/py/tests/test_dfu.py b/test/py/tests/test_dfu.py
index cc4b8d8e04..6c1a363b02 100644
--- a/test/py/tests/test_dfu.py
+++ b/test/py/tests/test_dfu.py
@@ -100,6 +100,12 @@ def test_dfu(u_boot_console, env__usb_dev_port, env__dfu_config):
Nothing.
'''
+ fh = u_boot_utils.attempt_to_open_file(
+ env__usb_dev_port['host_usb_dev_node'])
+ if fh:
+ fh.close()
+ raise Exception('USB device present before dfu command invoked')
+
u_boot_console.log.action(
'Starting long-running U-Boot dfu shell command')
OpenPOWER on IntegriCloud