test: Do flag-processing in the correct place
authorSimon Glass <sjg@chromium.org>
Fri, 7 Feb 2025 18:30:59 +0000 (11:30 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 12 Feb 2025 02:12:36 +0000 (20:12 -0600)
commit540bf7881a1a1c79c4d256b68396ae699e3a3157
tree18e2f1f00fc092846ea9f6daa783a7c1afb48fe5
parentd45fc8b2cd44a8836a76b462cc7af3e40a2e4227
test: Do flag-processing in the correct place

At present the 'ut' command handles its flags in a strange way, in that
they must come after the subcommand.

So, we must use 'ut bloblist -r2' to run the bloblist tests twice. This
is an artefact of the way tests were run, through subcommands.

It is now possible to correct this, by doing flag-processing before
running the suite.

Update the code to handle this, so that 'ut -r2 bloblist' works. Update
the 'test_suite' test to check the new arguments.

Add a sanity-check for -I while we are here.

Signed-off-by: Simon Glass <sjg@chromium.org>
test/cmd_ut.c
test/py/tests/test_suite.py