From 752c3769874596d012cd8325099d2ae20123f989 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 9 Feb 2025 09:07:14 -0700 Subject: test/py: Shorten u_boot_console This fixture name is quite long and results in lots of verbose code. We know this is U-Boot so the 'u_boot_' part is not necessary. But it is also a bit of a misnomer, since it provides access to all the information available to tests. It is not just the console. It would be too confusing to use con as it would be confused with config and it is probably too short. So shorten it to 'ubman'. Signed-off-by: Simon Glass Link: https://lore.kernel.org/u-boot/CAFLszTgPa4aT_J9h9pqeTtLCVn4x2JvLWRcWRD8NaN3uoSAtyA@mail.gmail.com/ --- test/py/tests/test_ofplatdata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/py/tests/test_ofplatdata.py') diff --git a/test/py/tests/test_ofplatdata.py b/test/py/tests/test_ofplatdata.py index 51a188454f3..47d6ddc8a50 100644 --- a/test/py/tests/test_ofplatdata.py +++ b/test/py/tests/test_ofplatdata.py @@ -6,9 +6,9 @@ import u_boot_utils as util @pytest.mark.boardspec('sandbox_spl') @pytest.mark.buildconfigspec('spl_of_platdata') -def test_spl_devicetree(u_boot_console): +def test_spl_devicetree(ubman): """Test content of spl device-tree""" - cons = u_boot_console + cons = ubman dtb = cons.config.build_dir + '/spl/u-boot-spl.dtb' fdtgrep = cons.config.build_dir + '/tools/fdtgrep' output = util.run_and_log(cons, [fdtgrep, '-l', dtb]) -- cgit v1.2.3 From d9ed4b75add4b4ccc37cf32b54cd9c77f48e3396 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 9 Feb 2025 09:07:15 -0700 Subject: test/py: Drop u_boot_ prefix on test files We know this is U-Boot so the prefix serves no purpose other than to make things longer and harder to read. Drop it and rename the files. Signed-off-by: Simon Glass Reviewed-by: Mattijs Korpershoek # test_android / test_dfu --- test/py/tests/test_ofplatdata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/py/tests/test_ofplatdata.py') diff --git a/test/py/tests/test_ofplatdata.py b/test/py/tests/test_ofplatdata.py index 47d6ddc8a50..d414a910d9f 100644 --- a/test/py/tests/test_ofplatdata.py +++ b/test/py/tests/test_ofplatdata.py @@ -2,7 +2,7 @@ # Copyright (c) 2016 Google, Inc import pytest -import u_boot_utils as util +import utils as util @pytest.mark.boardspec('sandbox_spl') @pytest.mark.buildconfigspec('spl_of_platdata') -- cgit v1.2.3 From dd693ecb60384049dd8c3f6a36331c1a70b6558f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 9 Feb 2025 09:07:16 -0700 Subject: test/py: Drop importing utils as util Now that we have a shorter name, we don't need this sort of thing. Drop it. Signed-off-by: Simon Glass Reviewed-by: Mattijs Korpershoek # test_android --- test/py/tests/test_ofplatdata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/py/tests/test_ofplatdata.py') diff --git a/test/py/tests/test_ofplatdata.py b/test/py/tests/test_ofplatdata.py index d414a910d9f..b4d2db03deb 100644 --- a/test/py/tests/test_ofplatdata.py +++ b/test/py/tests/test_ofplatdata.py @@ -2,7 +2,7 @@ # Copyright (c) 2016 Google, Inc import pytest -import utils as util +import utils @pytest.mark.boardspec('sandbox_spl') @pytest.mark.buildconfigspec('spl_of_platdata') @@ -11,7 +11,7 @@ def test_spl_devicetree(ubman): cons = ubman dtb = cons.config.build_dir + '/spl/u-boot-spl.dtb' fdtgrep = cons.config.build_dir + '/tools/fdtgrep' - output = util.run_and_log(cons, [fdtgrep, '-l', dtb]) + output = utils.run_and_log(cons, [fdtgrep, '-l', dtb]) assert "bootph-all" not in output assert "bootph-some-ram" not in output -- cgit v1.2.3 From d08653d3699c1aafada3418c9f74b887bfb21a65 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 9 Feb 2025 09:07:17 -0700 Subject: test/py: Drop assigning ubman to cons Now that we have a shorter name, we don't need this sort of thing. Just use ubman instead. Signed-off-by: Simon Glass --- test/py/tests/test_ofplatdata.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/py/tests/test_ofplatdata.py') diff --git a/test/py/tests/test_ofplatdata.py b/test/py/tests/test_ofplatdata.py index b4d2db03deb..d31fa55f7c7 100644 --- a/test/py/tests/test_ofplatdata.py +++ b/test/py/tests/test_ofplatdata.py @@ -8,10 +8,9 @@ import utils @pytest.mark.buildconfigspec('spl_of_platdata') def test_spl_devicetree(ubman): """Test content of spl device-tree""" - cons = ubman - dtb = cons.config.build_dir + '/spl/u-boot-spl.dtb' - fdtgrep = cons.config.build_dir + '/tools/fdtgrep' - output = utils.run_and_log(cons, [fdtgrep, '-l', dtb]) + dtb = ubman.config.build_dir + '/spl/u-boot-spl.dtb' + fdtgrep = ubman.config.build_dir + '/tools/fdtgrep' + output = utils.run_and_log(ubman, [fdtgrep, '-l', dtb]) assert "bootph-all" not in output assert "bootph-some-ram" not in output -- cgit v1.2.3