]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
test/py: provide more information about test skip reason
authorStephen Warren <swarren@nvidia.com>
Mon, 18 Sep 2017 17:11:48 +0000 (11:11 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 29 Sep 2017 18:07:52 +0000 (14:07 -0400)
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

index 65e1d75626cf82105b11130458ac9b264e0ffaa1..e2fc7fd7ef78d4fc459d5cf4c3f478c93f2f835e 100644 (file)
@@ -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)