History log of /system/update_engine/payload_consumer/download_action_unittest.cc
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
bffa06080ec8bd5d196cbfadf2023f78b6e89169 13-Feb-2016 Alex Deymo <deymo@google.com> Fix *ExtentWriterTest unittest.

These test were creating local files in the same directory where the
test is running from, which doesn't work on Android. This patch
leverages other newer temp file creation utilities that also take
care of removing the temp files.

Bug: 26955860
TEST=/data/nativetest/update_engine_unittests/update_engine_unittests --gtest_filter=*ExtentWriterTest.*

Change-Id: If5cd506ae0a7ca85b6fd5395a0982f00775836c7
/system/update_engine/payload_consumer/download_action_unittest.cc
5fe0c4ede81b82ae3425ddbbb698eceef14cbc78 17-Feb-2016 Alex Deymo <deymo@google.com> Fix unittest build in x86_64.

Some size_t values (generally resulting from X.size() calls) were
compared to off_t values (such as utils::FileSize()) which resulted
in a compile error on x86_64 targets. This patch fixes those issues
with explicit casts in the unittests since the range of the expected
values is small enough.

Bug: 26955860
TEST=`mma` on edison-eng and brilloemulator_x86_64-eng.

Change-Id: I2d09d356e1b97ab6527b17596fe20d425da6d519
/system/update_engine/payload_consumer/download_action_unittest.cc
80f70ff45f8ea9a679c0c3ed0dc143dd2fe2b63e 11-Feb-2016 Alex Deymo <deymo@google.com> Build unittests in Brillo.

Many unittests do not pass for simple reasons that will be addressed
later. This CL includes all the changes to make the unittests build.
In particular, the generated DBus mocks, required to build several
unittests are now included here.

The dbus-constants.h files were moved to the system_api repo, so they
can be removed from here.

The unittest build is only enabled for Brillo targets, since non-Brillo
targets don't even build DBus.

Bug: 26955860
TEST=`mmma` on edison-eng (and aosp_arm-eng).

Change-Id: Ib38241f0a6eb99b1d60d72db6bcfd125d38e3fad
/system/update_engine/payload_consumer/download_action_unittest.cc
64d9878470aa7b388e971862181daf6260851602 06-Feb-2016 Alex Deymo <deymo@google.com> Replace is_full_update boolean with a payload_state enum.

The "is_full_update" flag in the InstallPlan is required to decide
whether we should run a FilesystemVerification step before start
downloading the payload (for delta payloads) or not (for full payloads).
This step is done before start downloading the payload and not after
downloading the metadata to avoid long delays in the connection which
would then drop and require a retry.

Since the not so recent inclusion of the source_data_hash field in the
delta operations, the source data is verified on each operation, so the
install plan field and the pre-download FilesystemVerification is not
needed anymore.

To help deprecate this process, which is not included in the non-Brillo
version, this patch changes the is_full_update field to a payload_state
enum with a third "unknown" state that will be changed to delta or full
once the payload metadata is parsed.

Bug: 25631949
TEST=unittests updated.
TEST=Pushed a delta update to edison-eng and a non-Brillo target.

Change-Id: I17d8bf58990d8465bb8487adc66601f1c1dfca6d
/system/update_engine/payload_consumer/download_action_unittest.cc
1b3556cbe66b3f5be35f6117d4013ddc199b064c 03-Feb-2016 Alex Deymo <deymo@google.com> Allow null SystemState in the DownloadAction.

The SystemState is only defined in the libupdate_engine library, so
it may not be defined for other users of libpayload_consumer. This
patch allows to pass a nullptr for the SystemState while explicitly
passing the other classes defined in libpayload_consumer upon
construction.

Bug: None
TEST=FEATURES=test emerge-link update_engine
TEST=`mmma system/update_engine` on aosp_arm-eng and edison-eng

Change-Id: I535d0184a85e0a167ac65875f6e7c07832efbf40
/system/update_engine/payload_consumer/download_action_unittest.cc
542c19bf271011913a9f352f58e140224c936736 03-Dec-2015 Alex Deymo <deymo@google.com> Remove SystemState references from DeltaPerformer.

DeltaPerformer is used as part of the DownloadAction and had
references to the global SystemState. The common references to
BootControlInterface (to query the partitions based on the names
from the payload) and the HardwareInterface (for dev-mode bits) are
now referenced directly from the DeltaPerformer. The calls to
UpdateAttempter and PayloadState were moved to the
DownloadActionDelegate since these calls are received by classes
outside the payload_consumer.

Bug: 25773375
TEST=FEATURES=test emerge-link update_engine

Change-Id: Id2e81d5ccf835cad22f03b069c681dcce104c456
/system/update_engine/payload_consumer/download_action_unittest.cc
22ad86121ba56c576bfcaa23e085dab881bd4ff5 20-Nov-2015 Alex Deymo <deymo@google.com> Delete DownloadActionDelegate::SetDownloadStatus() method.

This method is only used by the caller to detect a programming error in
the DownloadAction (calling BytesReceived when not downloading) and log
a message. This patch removes the method from the delegate interface
and makes sure it doesn't issue a call to BytesReceived when not
activelly downloading.

Bug: 25773375
TEST=FEATURES=test emerge-link update_engine

Change-Id: I8ff5c53f1fd40c0777b3f6523703a8bee71c019d
/system/update_engine/payload_consumer/download_action_unittest.cc
39910dcd1d68987ccee7c3031dc269233a8490bb 10-Nov-2015 Alex Deymo <deymo@google.com> Split payload application code into a subdirectory.

This patch splits from the main libupdate_engine code the part that
is strictly used to download and apply a payload into a new static
library, moving the code to subdirectories. The new library is divided
in two subdirectories: common/ and payload_consumer/, and should not
depend on other update_engine files outside those two subdirectories.
The main difference between those two is that the common/ tools are more
generic and not tied to the payload consumer process, but otherwise they
are both compiled together.

There are still dependencies from the new libpayload_consumer library
into the main directory files and DBus generated files. Those will be
addressed in follow up CLs.

Bug: 25197634
Test: FEATURES=test emerge-link update_engine; `mm` on Brillo.

Change-Id: Id8d0204ea573627e6e26ca9ea17b9592ca95bc23
/system/update_engine/payload_consumer/download_action_unittest.cc