Fix downstream Chrome OS build.
Bug: None
Test: FEATURES=test emerge-link update_engine
Change-Id: I4550ede90c92a86c74b7e5aa96e6df58230ed3d8
diff --git a/common/utils_unittest.cc b/common/utils_unittest.cc
index eaae023..634de01 100644
--- a/common/utils_unittest.cc
+++ b/common/utils_unittest.cc
@@ -443,11 +443,11 @@
EXPECT_TRUE(BoolMacroTestHelper());
}
-TEST(UtilsTest, UnmountFilesystemFailureTest) {
+TEST(UtilsTest, RunAsRootUnmountFilesystemFailureTest) {
EXPECT_FALSE(utils::UnmountFilesystem("/path/to/non-existing-dir"));
}
-TEST(UtilsTest, UnmountFilesystemBusyFailureTest) {
+TEST(UtilsTest, RunAsRootUnmountFilesystemBusyFailureTest) {
string tmp_image;
EXPECT_TRUE(utils::MakeTempFile("img.XXXXXX", &tmp_image, nullptr));
ScopedPathUnlinker tmp_image_unlinker(tmp_image);
diff --git a/payload_consumer/postinstall_runner_action.cc b/payload_consumer/postinstall_runner_action.cc
index 9681e8c..a1b6f25 100644
--- a/payload_consumer/postinstall_runner_action.cc
+++ b/payload_consumer/postinstall_runner_action.cc
@@ -240,7 +240,8 @@
bool PostinstallRunnerAction::ProcessProgressLine(const string& line) {
double frac = 0;
- if (sscanf(line.c_str(), "global_progress %lf", &frac) == 1) {
+ if (sscanf(line.c_str(), "global_progress %lf", &frac) == 1 &&
+ !std::isnan(frac)) {
ReportProgress(frac);
return true;
}
diff --git a/update_engine.gyp b/update_engine.gyp
index 9e8d735..38d6ba1 100644
--- a/update_engine.gyp
+++ b/update_engine.gyp
@@ -133,9 +133,7 @@
'variables': {
'exported_deps': [
'libcrypto',
- 'libcurl',
'libimgpatch',
- 'libssl',
'xz-embedded',
],
'deps': ['<@(exported_deps)'],
@@ -161,7 +159,6 @@
'sources': [
'common/action_processor.cc',
'common/boot_control_stub.cc',
- 'common/certificate_checker.cc',
'common/clock.cc',
'common/constants.cc',
'common/cpu_limiter.cc',
@@ -170,7 +167,6 @@
'common/http_common.cc',
'common/http_fetcher.cc',
'common/hwid_override.cc',
- 'common/libcurl_http_fetcher.cc',
'common/multi_range_http_fetcher.cc',
'common/platform_constants_chromeos.cc',
'common/prefs.cc',
@@ -217,13 +213,15 @@
'variables': {
'exported_deps': [
'dbus-1',
+ 'expat',
+ 'libcurl',
'libdebugd-client',
- 'libsession_manager-client',
'libmetrics-<(libbase_ver)',
'libpower_manager-client',
- 'libupdate_engine-client',
+ 'libsession_manager-client',
'libshill-client',
- 'expat',
+ 'libssl',
+ 'libupdate_engine-client',
],
'deps': ['<@(exported_deps)'],
},
@@ -250,6 +248,7 @@
},
'sources': [
'boot_control_chromeos.cc',
+ 'certificate_checker.cc',
'common_service.cc',
'connection_manager.cc',
'connection_utils.cc',
@@ -259,6 +258,7 @@
'hardware_chromeos.cc',
'image_properties_chromeos.cc',
'libcros_proxy.cc',
+ 'libcurl_http_fetcher.cc',
'metrics.cc',
'metrics_utils.cc',
'omaha_request_action.cc',
@@ -493,10 +493,10 @@
'includes': ['../../../platform2/common-mk/common_test.gypi'],
'sources': [
'boot_control_chromeos_unittest.cc',
+ 'certificate_checker_unittest.cc',
'common/action_pipe_unittest.cc',
'common/action_processor_unittest.cc',
'common/action_unittest.cc',
- 'common/certificate_checker_unittest.cc',
'common/cpu_limiter_unittest.cc',
'common/fake_prefs.cc',
'common/file_fetcher.cc', # Only required for tests.