summaryrefslogtreecommitdiff
path: root/update_manager/generic_variables_unittest.cc
AgeCommit message (Collapse)Author
2019-01-16update_engine: Run clang-format on update_manager/Amin Hassani
BUG=none TEST=unittest Change-Id: I80b56209d757d1156dd5f55bdd758a1ae8388dcc Reviewed-on: https://chromium-review.googlesource.com/1409707 Commit-Ready: Amin Hassani <ahassani@chromium.org> Tested-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Amin Hassani <ahassani@chromium.org> Reviewed-by: Sen Jiang <senj@chromium.org>
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-06-13update_engine: Convert update_manager to chromeos::MessageLoop.Alex Deymo
The update_manager/event_loop.* files were basically an abstraction of the glib main loop in order to make it easier to replace it later. This patch removes those files and replaces their functions with the chromeos::MessageLoop interface, backing it up with a FakeMessageLoop during test, and a real GlibMessageLoop during normal execution. This patch reduces the running time of the unittest considerably since there is no need to wait for the timeouts. BUG=chromium:419827,chromium:402066 TEST=Unittest still pass. Tested on a link device that the UM still runs. Change-Id: Id572248ff4c9c8be7226ef8c653a5c94ab9c1677 Reviewed-on: https://chromium-review.googlesource.com/276892 Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
2014-11-13update_engine: Add override when possible.Alex Deymo
Google Style Guide requires to include the "override" keyword when overriding a method on a derived class, so the compiler will catch errors if the method is not overriding a member of the base class. This patch introduces the "override" keyword when possible. BUG=None TEST=FEATURES=test emerge-link update_engine Change-Id: Ie83d115c5730f3b35b3d95859a54bc1a48e0be7b Reviewed-on: https://chromium-review.googlesource.com/228928 Tested-by: Alex Deymo <deymo@chromium.org> Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org>
2014-11-12update_engine: Move test-only utils to test_utils.{h,cc}.Alex Deymo
utils.{h,cc} contains a collections of basic or small functions used in different parts of the codebase. The test_utils.{h,cc} instead contains functions only required during testing split out to a separated file to be reused in different tests. This CL moves without changes some functions defined in utils.h that were only used during unittests. Two other basic functions were replaced by the same function already present in base/ (StringHasSuffix and StringHasPrefix). The functions in test_utils.h now have their own namespace chromeos_update_engine::test_utils so is clear they come from the test_utils file, in the same way the ones from utils are in their own namespace. Some othe minor linter fixes included here. BUG=chromium:351429 TEST=Unittest still pass. Change-Id: I73ab72a14158cb21c8e1f404cbc728423bc8f34f Reviewed-on: https://chromium-review.googlesource.com/229021 Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
2014-11-01update_engine: Fix all the "using" declaration usage.Alex Deymo
This patch removes unused "using" declarations, that is, declarations included in a .cc file at a global scope such that "using foo::bar" that later don't use the identifier "bar" at all. This also unifies the usage of these identifiers in the .cc files in favor of using the short name defined by the using declaration. For example, in several cases the .h refer to a type like "std::string" because using declarations are forbidden in header files while the .cc includes "using std::string;" with the purpose of just writting "string" in the .cc file. Very rarely, the full identifier is used when a local name ocludes it, for example, StringVectorToGStrv() and StringVectorToString() in utils.cc named its argument just "vector" need to refer to std::vector with the full name. This patch renames those arguments instead. Finally, it also sorts a few lists of using declarations that weren't in order. BUG=None TEST=FEATURES=test emerge-link update_engine Change-Id: I30f6b9510ecb7e03640f1951c48d5bb106309840 Reviewed-on: https://chromium-review.googlesource.com/226423 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org> Tested-by: Alex Deymo <deymo@chromium.org>
2014-10-21update_engine: Replace scoped_ptr with std::unique_ptr.Ben Chan
BUG=None TEST=`FEATURES=test emerge-$BOARD update_engine` TEST=`USE='clang asan' FEATURES=test emerge-$BOARD update_engine` Change-Id: I55a2f7f53675faaac20ba25f72ed52cf938d7744 Reviewed-on: https://chromium-review.googlesource.com/224189 Tested-by: Ben Chan <benchan@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Ben Chan <benchan@chromium.org>
2014-09-01update_engine: Replace NULL with nullptrAlex Vakulenko
Replaced the usage of NULL with nullptr. This also makes it possible to use standard gtest macros to compare pointers in Update Manager's unit tests. So, there is no need in custom UMTEST_... macros which are replaced with the gtest macros (see change in update_engine/update_manager/umtest_utils.h): UMTEST_ASSERT_NULL(p) => ASSERT_EQ(nullptr, p) UMTEST_ASSERT_NOT_NULL(p) => ASSERT_NE(nullptr, p) UMTEST_EXPECT_NULL(p) => EXPECT_EQ(nullptr, p) UMTEST_EXPECT_NOT_NULL(p) => EXPECT_NE(nullptr, p) BUG=None TEST=FEATURES=test emerge-link update_engine USE="clang asan" FEATURES=test emerge-link update_engine Change-Id: I77a42a1e9ce992bb2f9f263db5cf75fe6110a4ec Reviewed-on: https://chromium-review.googlesource.com/215136 Tested-by: Alex Vakulenko <avakulenko@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
2014-07-19update_engine: fixed remaining linter and some spelling errorsAlex Vakulenko
Fixed remaining errors from cpplint as well as some spelling errors mostly in comments. BUG=None TEST=FEATURES=test emerge-link update_engine Change-Id: I484988ab846ac5a3c68c016ddccfb247f225ec27 Reviewed-on: https://chromium-review.googlesource.com/208897 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org> Tested-by: Alex Vakulenko <avakulenko@chromium.org>
2014-05-29Rename the PolicyManager to UpdateManager.Alex Deymo
This change renames the PolicyManager class, directory, tests, etc, to avoid confusion with libpolicy and its classes. BUG=chromium:373551 TEST=emerged on link. CQ-DEPEND=CL:I43081673c7ba409f02273197da7915537bde39c6 Change-Id: Iffa76caa3b95ecbbdba87ab01006d1d8ce35a27f Reviewed-on: https://chromium-review.googlesource.com/201876 Tested-by: Alex Deymo <deymo@chromium.org> Reviewed-by: David Zeuthen <zeuthen@chromium.org> Commit-Queue: Alex Deymo <deymo@chromium.org>