diff options
author | Michal Simek <michal.simek@xilinx.com> | 2017-05-18 10:23:14 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-06-05 21:13:02 +0300 |
commit | a5b548138b7356dbacc41ae5100dfda5200ea90b (patch) | |
tree | 86c7bc613410cf49aa8ace054f92826e27cbb275 /test/py | |
parent | dbf0518b608b1395bf81bad0b89e314c17ba339c (diff) | |
download | u-boot-a5b548138b7356dbacc41ae5100dfda5200ea90b.tar.xz |
test: py: Use global pytestmark for hush tests
All tests in test_hush_if_test depends on hush parser to be
present. This patch simplify test dependencies by using global
pytestmark.
Reported-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'test/py')
-rw-r--r-- | test/py/tests/test_hush_if_test.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/py/tests/test_hush_if_test.py b/test/py/tests/test_hush_if_test.py index b572538528..056a288030 100644 --- a/test/py/tests/test_hush_if_test.py +++ b/test/py/tests/test_hush_if_test.py @@ -8,6 +8,8 @@ import os import os.path import pytest +pytestmark = pytest.mark.buildconfigspec('hush_parser') + # The list of "if test" conditions to test. subtests = ( # Base if functionality. @@ -109,27 +111,23 @@ def exec_hush_if(u_boot_console, expr, result): response = u_boot_console.run_command(cmd) assert response.strip() == str(result).lower() -@pytest.mark.buildconfigspec('hush_parser') def test_hush_if_test_setup(u_boot_console): """Set up environment variables used during the "if" tests.""" u_boot_console.run_command('setenv ut_var_nonexistent') u_boot_console.run_command('setenv ut_var_exists 1') -@pytest.mark.buildconfigspec('hush_parser') @pytest.mark.parametrize('expr,result', subtests) def test_hush_if_test(u_boot_console, expr, result): """Test a single "if test" condition.""" exec_hush_if(u_boot_console, expr, result) -@pytest.mark.buildconfigspec('hush_parser') def test_hush_if_test_teardown(u_boot_console): """Clean up environment variables used during the "if" tests.""" u_boot_console.run_command('setenv ut_var_exists') -@pytest.mark.buildconfigspec('hush_parser') # We might test this on real filesystems via UMS, DFU, 'save', etc. # Of those, only UMS currently allows file removal though. @pytest.mark.boardspec('sandbox') |