blob: 656f27570c013f68d56751ded67e6ef2d2ca7ffd [file] [log] [blame]
Flashrom Testing
Overall idea:
- Break tests into small chunks
- Have a single program that does generic setup and shutdown functions
- Executes specified tests in a simple loop
- uuencode
- diff
- A version of flashrom which is installed in $PATH. This is assumed to be a
"good" version of Flashrom and will be used to obtain a backup copy of the
ROM image at the beginning, and restore the image at the end.
Important environment variables:
FLASHROM: Path to the Flashrom binary to test
FLASHROM_PARAM: Extra parameters to pass into flashrom, such as -p. Do *not*
specify chip operations such as read/write/erase/verify here, as they are
redundant with commands the script executes.
Important global variables:
BACKUP: The backup copy of ROM image which is read before executing any tests,
and restored unconditionally after execution of tests.
ENV_VARS="blah" ./ <test1> <test2>
FLASHROM="../flashrom" FLASHROM_PARAM="-p internal:bus=spi" ./do_tests
Each unit test might have its own special requirements, such as extra
environment variables, layout files, etc. Please read the comments at the top
of each unit test to ensure there are no special dependencies.