summaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
Diffstat (limited to 'test/py')
-rwxr-xr-xtest/py/test.py10
-rw-r--r--test/py/tests/test_fs/conftest.py15
-rw-r--r--test/py/tests/test_ofplatdata.py1
3 files changed, 11 insertions, 15 deletions
diff --git a/test/py/test.py b/test/py/test.py
index bee88d96bc2..285fda54258 100755
--- a/test/py/test.py
+++ b/test/py/test.py
@@ -10,11 +10,11 @@
import os
import os.path
import sys
+import pytest
from pkg_resources import load_entry_point
-# argv; py.test test_directory_name user-supplied-arguments
-args = [os.path.dirname(__file__) + '/tests']
-args.extend(sys.argv)
-
if __name__ == '__main__':
- sys.exit(load_entry_point('pytest', 'console_scripts', 'pytest')(args))
+ # argv; py.test test_directory_name user-supplied-arguments
+ args = [os.path.dirname(__file__) + '/tests']
+ args.extend(sys.argv)
+ sys.exit(pytest.main(args))
diff --git a/test/py/tests/test_fs/conftest.py b/test/py/tests/test_fs/conftest.py
index 58e8cd46ee2..ec70e8c4ef3 100644
--- a/test/py/tests/test_fs/conftest.py
+++ b/test/py/tests/test_fs/conftest.py
@@ -243,8 +243,7 @@ def umount_fs(mount_point):
# Fixture for basic fs test
# derived from test/fs/fs-test.sh
#
-# NOTE: yield_fixture was deprecated since pytest-3.0
-@pytest.yield_fixture()
+@pytest.fixture()
def fs_obj_basic(request, u_boot_config):
"""Set up a file system to be used in basic fs test.
@@ -352,8 +351,7 @@ def fs_obj_basic(request, u_boot_config):
#
# Fixture for extended fs test
#
-# NOTE: yield_fixture was deprecated since pytest-3.0
-@pytest.yield_fixture()
+@pytest.fixture()
def fs_obj_ext(request, u_boot_config):
"""Set up a file system to be used in extended fs test.
@@ -439,8 +437,7 @@ def fs_obj_ext(request, u_boot_config):
#
# Fixture for mkdir test
#
-# NOTE: yield_fixture was deprecated since pytest-3.0
-@pytest.yield_fixture()
+@pytest.fixture()
def fs_obj_mkdir(request, u_boot_config):
"""Set up a file system to be used in mkdir test.
@@ -472,8 +469,7 @@ def fs_obj_mkdir(request, u_boot_config):
#
# Fixture for unlink test
#
-# NOTE: yield_fixture was deprecated since pytest-3.0
-@pytest.yield_fixture()
+@pytest.fixture()
def fs_obj_unlink(request, u_boot_config):
"""Set up a file system to be used in unlink test.
@@ -538,8 +534,7 @@ def fs_obj_unlink(request, u_boot_config):
#
# Fixture for symlink fs test
#
-# NOTE: yield_fixture was deprecated since pytest-3.0
-@pytest.yield_fixture()
+@pytest.fixture()
def fs_obj_symlink(request, u_boot_config):
"""Set up a file system to be used in symlink fs test.
diff --git a/test/py/tests/test_ofplatdata.py b/test/py/tests/test_ofplatdata.py
index d55338e37e6..92d09b7aa19 100644
--- a/test/py/tests/test_ofplatdata.py
+++ b/test/py/tests/test_ofplatdata.py
@@ -4,6 +4,7 @@
import pytest
import u_boot_utils as util
+@pytest.mark.boardspec('sandbox')
@pytest.mark.buildconfigspec('spl_of_platdata')
def test_spl_devicetree(u_boot_console):
"""Test content of spl device-tree"""