summaryrefslogtreecommitdiff
path: root/payload_generator/blob_file_writer_unittest.cc
AgeCommit message (Collapse)Author
2020-10-29update_engine: Fix leaking unit testsAmin Hassani
Some of the unit tests have been leaking temp files because they don't properly unlink them. In this CL, we did some rearrangement of the ScopedTempFile class and moved it into the utils.h (instead of testing only location) so it can be used everywhere and more efficiently. Also added functionality to open an file descriptor too so users don't have to keep a different object for the file descriptor. BUG=b:162766400 TEST=cros_workon_make --board reef --test; Then looked at the /build/reef/tmp directory and no files were leaked. Change-Id: Id64a2923d30f27628120497fdefe16bf65fa3fb0 Reviewed-on: https://chromium-review.googlesource.com/c/aosp/platform/system/update_engine/+/2500772 Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Jae Hoon Kim <kimjae@chromium.org> Commit-Queue: Amin Hassani <ahassani@chromium.org>
2019-01-16update_engine: Run clang-format on payload_generator/Amin Hassani
BUG=none TEST=unittest Change-Id: I00cafb1fc709d8f02119cb0058cfcb0b573ef25d Reviewed-on: https://chromium-review.googlesource.com/1409927 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Sen Jiang <senj@chromium.org>
2015-11-12Split payload application code into a subdirectory.Alex Deymo
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
2015-10-13update_engine: Rename "chromeos" -> "brillo" in include paths and namespacesAlex Vakulenko
libchromeos is transitioning to libbrillo and chromeos namespaces and include directory is changing to brillo. Bug: 24872993 Change-Id: I770659a95be380a50fe3b2ba9f91d65818f40945
2015-08-19Re-license update_engine to Apache2Alex Deymo
This patch automatically replaced the license on all text files from Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as a reference. The license header was added to .gyp and .gypi files, the NOTICE was replaced with a copy of the Apache2 license and MODULE_LICENSE_* file was updated. BUG=b/23084294 TEST=grep 'Chromium OS Authors' doesn't find anything. Change-Id: Ie5083750755f5180a8a785b24fe67dbf9195cd10
2015-08-13update_engine: Change OperationsGenerator to use BlobFileWriterSen Jiang
BUG=chromium:517280 TEST=Unit test for BlobFileWriter Change-Id: Ib49925676331acee97ff6b4cec38a81ca8b157a1 Reviewed-on: https://chromium-review.googlesource.com/291441 Tested-by: Sen Jiang <senj@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Sen Jiang <senj@chromium.org>