From 4728242070ce806828024f00ab3dac6ba48f3206 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Mon, 9 Jan 2017 13:45:37 -0800 Subject: Do not inject I/O fault on a retry We could inject I/O faults during an OTA update for test purpose. But we should skip the injection if the update is an retry. Otherwise the update test will simply keeps failing. Bug: 34159970 Test: Apply the same package on angler and the update succeeds on the 2nd try. Change-Id: Id274e5475e3bc8d25d50a8cf61a77d2e32c569d6 --- updater/updater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'updater/updater.cpp') diff --git a/updater/updater.cpp b/updater/updater.cpp index 3e624dae7..473066263 100644 --- a/updater/updater.cpp +++ b/updater/updater.cpp @@ -100,7 +100,6 @@ int main(int argc, char** argv) { CloseArchive(za); return 3; } - ota_io_init(za); ZipString script_name(SCRIPT_NAME); ZipEntry script_entry; @@ -166,6 +165,7 @@ int main(int argc, char** argv) { printf("unexpected argument: %s", argv[4]); } } + ota_io_init(za, state.is_retry); std::string result; bool status = Evaluate(&state, root, &result); -- cgit v1.2.3