AU/unittest: postinstall tests use uniquely named stateful + working directories
This should allow these tests to be run in parallel. Also includes an
extension to PostinstallRunnerAction and two global powerwash marker
utility functions to allow testing with uniquely named marker file paths
(necessary to avoid race conditions when multiple tests are run in
parallel).
BUG=chromium:236465
TEST=Uniquely named directories created, used and removed.
Change-Id: I5dde0c0732c51e9e3bb2240cf7e0cac03bcde529
Reviewed-on: https://gerrit.chromium.org/gerrit/60864
Commit-Queue: Gilad Arnold <garnold@chromium.org>
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Gilad Arnold <garnold@chromium.org>
diff --git a/postinstall_runner_action.cc b/postinstall_runner_action.cc
index 1143447..0f8059e 100644
--- a/postinstall_runner_action.cc
+++ b/postinstall_runner_action.cc
@@ -58,7 +58,7 @@
completer.set_should_complete(false);
if (install_plan_.powerwash_required) {
- if (utils::CreatePowerwashMarkerFile()) {
+ if (utils::CreatePowerwashMarkerFile(powerwash_marker_file_)) {
powerwash_marker_created_ = true;
} else {
completer.set_code(kErrorCodePostinstallPowerwashError);
@@ -84,7 +84,7 @@
// Undo any changes done to trigger Powerwash using clobber-state.
if (powerwash_marker_created_)
- utils::DeletePowerwashMarkerFile();
+ utils::DeletePowerwashMarkerFile(powerwash_marker_file_);
if (return_code == 3) {
// This special return code means that we tried to update firmware,