diff mbox series

[U-Boot,2/3] test/py: provide more information about test skip reason

Message ID 20170918171149.23792-2-swarren@wwwdotorg.org
State Accepted
Commit d5170448ae79581af973f447ba6077118999c963
Delegated to: Tom Rini
Headers show
Series [U-Boot,1/3] test/py: Document required tools/packages | expand

Commit Message

Stephen Warren Sept. 18, 2017, 5:11 p.m. UTC
From: Stephen Warren <swarren@nvidia.com>

When skipping tests, explicitly mention the board type or config option
that caused the skip. This will help people understand/fix any issues.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 test/py/conftest.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Tom Rini Sept. 29, 2017, 8:25 p.m. UTC | #1
On Mon, Sep 18, 2017 at 11:11:48AM -0600, Stephen Warren wrote:

> From: Stephen Warren <swarren@nvidia.com>
> 
> When skipping tests, explicitly mention the board type or config option
> that caused the skip. This will help people understand/fix any issues.
> 
> Signed-off-by: Stephen Warren <swarren@nvidia.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/test/py/conftest.py b/test/py/conftest.py
index 65e1d75626cf..e2fc7fd7ef78 100644
--- a/test/py/conftest.py
+++ b/test/py/conftest.py
@@ -429,12 +429,12 @@  def setup_boardspec(item):
     for board in mark.args:
         if board.startswith('!'):
             if ubconfig.board_type == board[1:]:
-                pytest.skip('board not supported')
+                pytest.skip('board "%s" not supported' % ubconfig.board_type)
                 return
         else:
             required_boards.append(board)
     if required_boards and ubconfig.board_type not in required_boards:
-        pytest.skip('board not supported')
+        pytest.skip('board "%s" not supported' % ubconfig.board_type)
 
 def setup_buildconfigspec(item):
     """Process any 'buildconfigspec' marker for a test.
@@ -455,7 +455,7 @@  def setup_buildconfigspec(item):
         return
     for option in mark.args:
         if not ubconfig.buildconfig.get('config_' + option.lower(), None):
-            pytest.skip('.config feature not enabled')
+            pytest.skip('.config feature "%s" not enabled' % option.lower())
 
 def start_test_section(item):
     anchors[item.name] = log.start_section(item.name)