faft: Create a lockfile on test init and remove it on cleanup

In order to remove possible interference from outside utilities
add a lockfile that is present during FAFT testing and cleaned up
when FAFT is done.

This is going to be used by chromeos-setgoodkernel which operates
on GPT 30 seconds after boot, and also runs chromeos-firmwareupdate
with --mode=bootok.  Depending on the test being run either of
these actions can interfere with FAFT testing and lead to inconstent
results and makes it very difficult to debug test failures.

BUG=chrome-os-partner:30832
TEST=run suite:faft_bios on samus, check that lockfile is created
during test init and removed in test cleanup step.

Change-Id: I3f483110d3dcdd14eaa55c1a59aa1387cd38c617
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/222010
Reviewed-by: Yusuf Mohsinally <mohsinally@chromium.org>
Reviewed-by: danny chan <dchan@chromium.org>
1 file changed