futility/updater: Ignore preserve_me quirks for non-host programmers.

The preserve_me quirk allows avoiding modifying the ME region while it
may be running. Its apply function attempts to skip itself when not
flashing the OS-bundled firmware by checking for whether an archive is
set, but this doesn't work since in the absence of an actual archive
file, a filesystem archive implementation is used instead.

While flashing over a non-host programmer the ME is not running and
therefore it is safe to update the ME region.

Add unit test cases for the preserve_me quirk applying successfully when
using the default host programmer and being skipped when using another
programmer.

BUG=b:213706510
TEST=futility update -p dummy... with preserve_me quirk skips the quirk;
     chromeos-firmwareupdate with a preserve_me quirk applies the quirk
BRANCH=none

Change-Id: Ie5578c9b3cf7eba55626bb931589bf360fe28269
Signed-off-by: Sam McNally <sammc@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3450060
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2 files changed