]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
Revert "test: py: Disable sleep test for qemu targets"
authorMichal Simek <michal.simek@xilinx.com>
Fri, 8 Dec 2017 13:22:52 +0000 (14:22 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 4 Jan 2018 15:19:12 +0000 (16:19 +0100)
This reverts commit e27574f9ae996dcf5dbd60dc905081661ae5ebff.
Based on discussion in mainline boardevn variables should be used for
skipping incorrect tests.

And also reverts commit "py: i2c: Do not run i2c eeprom test on qemu"
(sha1: 9fe2f228b97eaa5035ec2bc58b49b3cd8b359f73)

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
test/py/conftest.py
test/py/pytest.ini
test/py/tests/test_i2c.py
test/py/tests/test_sleep.py

index e143b1d2116b558e2516f808061f2c8e67ec0320..65e1d75626cf82105b11130458ac9b264e0ffaa1 100644 (file)
@@ -436,33 +436,6 @@ def setup_boardspec(item):
     if required_boards and ubconfig.board_type not in required_boards:
         pytest.skip('board not supported')
 
-def setup_boardidentity(item):
-    """Process any 'boardidentity' marker for a test.
-
-    Such a marker lists the set of board identity that a test does/doesn't
-    support. If tests are being executed on an unsupported board, the test is
-    marked to be skipped.
-
-    Args:
-        item: The pytest test item.
-
-    Returns:
-        Nothing.
-    """
-    mark = item.get_marker('boardidentity')
-    if not mark:
-        return
-    required_boards = []
-    for board in mark.args:
-        if board.startswith('!'):
-            if ubconfig.board_identity == board[1:]:
-                pytest.skip('board identity not supported')
-                return
-        else:
-            required_boards.append(board)
-    if required_boards and ubconfig.board_identity not in required_boards:
-        pytest.skip('board identity not supported')
-
 def setup_buildconfigspec(item):
     """Process any 'buildconfigspec' marker for a test.
 
@@ -502,7 +475,6 @@ def pytest_runtest_setup(item):
 
     start_test_section(item)
     setup_boardspec(item)
-    setup_boardidentity(item)
     setup_buildconfigspec(item)
 
 def pytest_runtest_protocol(item, nextitem):
index 9d64671814dea92e75898c165848ffe05fb5d8c2..67e514f42058c785fd16f9e516775627a7a84490 100644 (file)
@@ -8,5 +8,4 @@
 [pytest]
 markers =
     boardspec: U-Boot: Describes the set of boards a test can/can't run on.
-    boardidentity: U-Boot: Describes the board identity a test can/can't run on.
     buildconfigspec: U-Boot: Describes Kconfig/config-header constraints.
index 2e4a91bedab1638f8ba60366e9be8b92187363c9..d423c36fb3f79adce4d7e1db50b1117cd58a8c52 100644 (file)
@@ -33,7 +33,6 @@ def test_i2c_probe(u_boot_console):
     response = u_boot_console.run_command("i2c probe")
     assert(expected_response in response)
 
-@pytest.mark.boardidentity("!qemu")
 @pytest.mark.boardspec("zynq_zc702")
 @pytest.mark.boardspec("zynq_zc706")
 @pytest.mark.buildconfigspec("cmd_i2c")
index c094eba0844084f1f7df481c44ab4ffa84878923..30bdea518e8559382ffdc3e55a74771f4f605127 100644 (file)
@@ -14,7 +14,6 @@ env__sleep_accurate = False
 
 """
 
-@pytest.mark.boardidentity("!qemu")
 def test_sleep(u_boot_console):
     """Test the sleep command, and validate that it sleeps for approximately
     the correct amount of time."""