[PATCH v4 4/4] test: env: add test for env info sub-command

Stephen Warren swarren at wwwdotorg.org
Tue Jun 16 00:09:14 CEST 2020


On 6/15/20 8:01 AM, Patrick Delaunay wrote:
> Add a pytest for testing the env info sub-command:
> 
> test_env_info: test command with several option
> 
> test_env_info_quiet: test the result of the sub-command with quiet option,
> '-q' as used for support in shell test; for example:
>   if env info -p -d -q; then env save; fi

> diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py

> + at pytest.mark.boardspec('sandbox')
> + at pytest.mark.buildconfigspec('cmd_nvedit_info')
> +def test_env_info(state_test_env):

The body of these tests doesn't look like it tests something that's
specific to sandbox, so I'm not sure why the test function is marked to
only run on sandbox. Is it simply because other boards may store the
environment differently and/or have valid saved environment in flash, so
the responses to e.g. "env info" aren't the same everywhere? If so, I
imagine that test_env_info_quiet() doesn't need to be sandbox-only,
since there's no output in that case.


More information about the U-Boot mailing list