
On Fri, Sep 15, 2017 at 12:19:38PM -0600, Stephen Warren wrote:
From: Stephen Warren swarren@nvidia.com
Make various changes to the GPT test:
- Reference the disk image using an absolute path in all cases. This
allows test/py to operate correctly if it's run from a directory other than the root of the U-Boot source tree.
- Store the disk image in the teswt/py persistent data directory. This
removes the need to re-generate it every time the tests are run.
- Execute sgdisk using u_boot_utils.run_and_log() so that its output is
captured in the test log. This allows debugging any problems running it.
- Make the disk image a test fixture. This removes the requirement to
always run all GPT tests, and run them in order. The current code doesn't create the disk image if e.g. just test_gpt_uuid() is executed via the test.py -k command-line option.
- Use @pytest.mark.buildconfigspec for all feature dependencies, rather
than manually implementing some of them.
- Make all tests depend on sandbox, since they use the sandbox-specific
host command.
Fixes: a2f422555fc8 ("add pytests for 'gpt guid' command in sandbox") Fixes: c5772188ede9 ("add pytests for 'gpt rename' and 'gpt swap'") Signed-off-by: Stephen Warren swarren@nvidia.com
Tested-by: Tom Rini trini@konsulko.com