From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Mon, 5 Oct 2020 13:51:23 -0600 Subject: [PATCH 15/17] pytest: Collect SPL unit tests In-Reply-To: References: <20201003152534.3184504-1-sjg@chromium.org> <20201003152534.3184504-16-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stephen, On Mon, 5 Oct 2020 at 13:39, Stephen Warren wrote: > > On 10/3/20 9:25 AM, Simon Glass wrote: > > Add a new test_spl fixture to handle running SPL unit tests. > > > diff --git a/test/py/conftest.py b/test/py/conftest.py > > > @@ -317,10 +318,13 @@ def pytest_generate_tests(metafunc): > > Returns: > > Nothing. > > """ > > - > > + #print('name', metafunc.fixturenames) > > Revert that debug change? Will do. > > > diff --git a/test/py/tests/test_spl.py b/test/py/tests/test_spl.py > > > + cons.restart_uboot_with_flags(['-u', ut_spl_subtest]) > > How is that change reverted when the test runs, so that subsequent tests > are run on the main U-Boot rather than this restarted U-Boot? Well actually at the moment it just continues into U-Boot. It will mostly pass the tests, but probably not all of them. > > It feels like it'd be better to start a separate top-level test run for > this purpose, rather than swap out the U-Boot process in the middle of a > test run. I was hoping that the fixture stuff would take care of that. How would I do a separate top-level test run? Regards, Simon