Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • early-display
  • variant-emmc-nvme-boot
  • 2023-01-25
  • v3
  • variant-emmc-nvme-boot
  • 2020-06-01
7 results

test_gpt.py

Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Stephen Warren's avatar
    110ba625
    test/py: gpt: make use of infra-structure · 110ba625
    Stephen Warren authored
    
    Make various changes to the GPT test:
    
    1) 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.
    
    2) 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.
    
    3) 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.
    
    4) 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.
    
    5) Use @pytest.mark.buildconfigspec for all feature dependencies, rather
    than manually implementing some of them.
    
    6) Make all tests depend on sandbox, since they use the sandbox-specific
    host command.
    
    Fixes: a2f42255 ("add pytests for 'gpt guid' command in sandbox")
    Fixes: c5772188 ("add pytests for 'gpt rename' and 'gpt swap'")
    Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
    Tested-by: default avatarTom Rini <trini@konsulko.com>
    110ba625
    History
    test/py: gpt: make use of infra-structure
    Stephen Warren authored
    
    Make various changes to the GPT test:
    
    1) 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.
    
    2) 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.
    
    3) 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.
    
    4) 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.
    
    5) Use @pytest.mark.buildconfigspec for all feature dependencies, rather
    than manually implementing some of them.
    
    6) Make all tests depend on sandbox, since they use the sandbox-specific
    host command.
    
    Fixes: a2f42255 ("add pytests for 'gpt guid' command in sandbox")
    Fixes: c5772188 ("add pytests for 'gpt rename' and 'gpt swap'")
    Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
    Tested-by: default avatarTom Rini <trini@konsulko.com>