summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-08-20libchrome: Add RTTI support for static test librariesAlex Vakulenko
Many targets linking to libchrome's test libraries require RTTI, so we need to compile that into. BUG:22827642 Change-Id: I914e7814eab06c83206c22be97fcea859da337d0
2015-08-19Enable logging and use __ANDROID__ instead of __BRILLO__.Daniel Erat
Drop the __BRILLO__ #define, instead using the existing __ANDROID__ define set by the toolchain and setting a new __ANDROID_HOST__ define when building for the host. Also use Android logging when __ANDROID__ is defined. Bug: 23358460 Change-Id: I0d86eac8af381b002a3d46d8a95434c7e24518bd
2015-08-14Merge "Fixing unit tests to pass when run."Ari Hausman-Cohen
2015-08-14Add -frtti when building libchrome-dbus.Daniel Erat
Otherwise, other code that uses RTTI (e.g. webservd) fails to link against this library. Bug: 22828211 Change-Id: If4841bc1a0e8f5721973c10971c963916febd6c2
2015-08-13Fixing unit tests to pass when run.Ari Hausman-Cohen
Submitted before chromium cl 1273243002 went through, CQ found issue that is fixed here. BUG: 22884411, 22947438 Change-Id: Ib91967ce6cdd60d4c923822b0fa52c40661070fe
2015-08-11Fixing unit tests to pass when run.Ari Hausman-Cohen
See discussion on bug. Summary: * When building for brillo not on host tmp dir now defaults to the android "/data/local/tmp" * Command line is temporary fix because current test runner doesn't Init. * Dir reader posix was using an outdated method of getting a temp dir. (checked with agl) * String conversions used incorrect capitalization of locales. * File path needed localization on host machine (checked with rvargas) BUG: 22884411, 22947438 Change-Id: Ib7ffa58a84c8d93c819ba572e2fbd04dd1719e55
2015-08-11Add libchrome_dbus_test_helpers shared libraryAlex Vakulenko
This libraries provides mocks for D-Bus objects such dbus::MockBus, dbus::MockExportedObject, etc which are needed by some unit tests in other components that use D-Bus BUG:23113639 Change-Id: Ibde1604a9c523d86d9d445fc9b4d1811c8f373f8
2015-08-10Changes libchrome over to the bionic test runnerAri Hausman-Cohen
BUG: 22930934 Change-Id: I1ee96af88d776402c0c611b359ca449a23478721
2015-08-06Fix Mac build.Ying Wang
Change-Id: I01cd391e02380a050c161929f49e4242b08552ae
2015-08-06Add missing test files to libchrome_test_helpers libraryAlex Vakulenko
Some code (like libweave) depends on more libchorme test functionality (e.g. gtest's printer for base::FilePath for example). Re-added the test files which used to be in libchrome-test target on Chrome OS. BUG:22948980 Change-Id: Id11af3a4eb3c1794185027d180d7caa5eea5eda5
2015-08-05Update libchrome to build host unit tests in addition to native unit tests.Ari Hausman-Cohen
Bug: 22947438 Change-Id: I6e9bed267dea968f997c3a275eacadfb033038b9
2015-07-31Updated libchrome to build native unit testsAri Hausman-Cohen
libchromeTests added to Android.mk, along with many unit test files. Once built and synced, the tests can be run on the device/emulator via /data/nativetest/libchrome_test/libchrome_test Moved the gtest & gmock testing directory out of base/ since all the files were looking for it directly under libchrome/. Bug: 22857514 Change-Id: Ib65897b32979160768dd1e45092bb8f520833666 Signed-off-by: Ari Hausman-Cohen <arihc@google.com>
2015-07-31Added missing testing files.Ari Hausman-Cohen
Copied over from chromium. Change-Id: Ifd85df6fe2f7db40130c2baf663f04e2d0c64fe9
2015-07-30Compile test helpers.Bertrand SIMONNET
We use simple_test_clock in libchromeos' unit tests. BUG: 22372020 Change-Id: Ia4f9e6df51485c9c0f6fe220835feb66c7e8f82f
2015-07-27Merge "base64: Fix import path for modp_b64."Bertrand Simonnet
2015-07-24Only build libchrome on Linux.Elliott Hughes
I'm not sure what the brillo plan is, but this currently doesn't build on Mac OS because there's a #define __linux__ 1 in build/build_config.h; a lie which makes libc++ understandably unhappy. That whole block of #defines looks suspicious, so rather than touch it let's just not even try to build for the Mac for now. Change-Id: Ie50f2087376e8563f67db8b81dc7509d77368fb8
2015-07-24base64: Fix import path for modp_b64.Bertrand SIMONNET
modp_b64 was moved to a subdirectory. We need to change the import path too. Change-Id: I3b9e75895bf93dc6c128944264e205240ddf33ca
2015-07-24Fix compilation on 32bit hostsChristopher Wiley
statfs_buf.f_type is apparently an int on some architectures. However, the macros we compare it with do not fit in a signed 32 bit number. Fix this by casting up to a sufficiently large unsigned type. Bug: 22608897 Change-Id: I2de2520a9094c4ce154ab2cc16f0d56564dfdc4f
2015-07-24Add libchrome-host build targetChristopher Wiley
Remote base/sys_info_chromeos.cc from the set of files we build for both target and host libraries. It's not obvious why we need this file on Android, and we can't use it on host. Bug: 22608897 Change-Id: Idcf8f4fd4bd46df6d99841c54e1bb59a734a0453
2015-07-21Build base::AlarmTimer into libchrome.Daniel Erat
Original Chrome OS commit message: crrev.com/26436e402e6e1b780f6565539ae0acb3e2976fb9 added a new timer class to chrome that is capable of waking the system from suspend. shill and powerd also need to use this timer but unfortunately the git mirror for the directory where the timer class lives has not been set up yet and it's probably too close to the branch point now to risk trying to uprev libchrome anyway. Instead we can backport that particular CL into the chrome os tree until the next time we update libchrome. This adds the components/ directory from Chrome OS's libchrome package, as pulled in by the following commits: https://chromium-review.googlesource.com/226183 https://chromium-review.googlesource.com/227460 https://chromium-review.googlesource.com/234450 Bug: 22317122 Change-Id: I23630e2eac709aa86340435c44b822f58245d36a
2015-07-16Add a libchrome-dbus shared library.Daniel Erat
Also move the protobuf/message_lite.h stub to a top-level third_party directory; I'd previously incorrectly placed it in base/third_party. Bug: 22317122 Change-Id: I4e19102a55d2c9a99983cc148333cd8ca4981472
2015-07-16Add missing virtual d'tor to dbus::PropertyBase.Daniel Erat
This is a compilation fix already upstreamed at https://codereview.chromium.org/1237343003/ (r339031). Bug: 22317122 Change-Id: Ia8f1409fbd5eb9cf3b9675754c97f153bdb2a584
2015-07-15Add upstream dbus/ code as of Chromium r334380.Daniel Erat
Copy the unchanged source from https://chromium.googlesource.com/chromium/src/dbus/ as of r334380 (really r334285 a.k.a. d04f83ef in the dbus/ subtree). Bug: 22317122 Change-Id: I598920914a737fe12e2f8199d6826f113991dc5b
2015-07-13Merge "Make MessageLoopForIO work with -fno-rtti."Bertrand SIMONNET
2015-07-10Include base/base64.cc in the build.Arman Uguray
Added base/base64.cc to the build. To successfully compile, added dependency to libmodp64 which is needed by the base64 functions. Dependent CL: http://r.android.com/159070 Bug: 22353299 Change-Id: Ibaabba51973b92d32cca9bc8c7e2e63741653c96
2015-07-10Make MessageLoopForIO work with -fno-rtti.Bertrand SIMONNET
libchrome is build with -fno-rtti (default on Android). As MessageLoopForIO doesn't define any key methods, the typeinfo is missing and we can't use this class. Defining the constructor in message_loop.cc fixes this problem. Change-Id: Ie76b27511300600557b8b4dffc219f930d31606c
2015-07-09Add missing virtual destructors.Daniel Erat
Update the following classes: base::FileTracing::Provider base::internal::PostTaskAndReplyImpl base::PostTaskAndReplyWorkerPool base::TraceLog::EnabledStateObserver Also remove -Wnon-virtual-dtor. This is avakulenko@chromium.org's base-334380-file-tracing-provider-virt-dtor.patch from Chrome OS with a few more classes added. The original commit was https://chromium-review.googlesource.com/278013. Bug: 22317122 Change-Id: Ib7e68ed5b92867ad07128ad9279d059a0eb25864
2015-07-08Add std::unique_ptr to base::Bind and base::Callback.Daniel Erat
Add support for std::unique_ptr (and std::vector<std::unique_ptr<T>> as well as std::map<K, std::unique_ptr<T>>) to base::Bind and base::Callback(). This patch can be removed when Chrome's base/ has full support for C++11 library features and supports C++11 native move-only types and perfect forwarding. This is avakulenko@chromium.org's base-334380-bind-unique_ptr.patch from Chrome OS, with std::map and std::vector forward declarations replaced with <map> and <vector> includes to work around ambiguous-reference errors when building on Android. The original commit was https://chromium-review.googlesource.com/267720. Bug: 22317122 Change-Id: I641dd1e115bbfdb561a062efcbadb93072a5951b
2015-07-08Build libchrome as shared library on Android.Daniel Erat
Add Android.mk and build_config.h files, along with stubs for gmock, gtest, and protobuf headers in the locations where Chromium expects them to be. Also patch a few source files so they'll build. Bug: 22317122 Change-Id: If4d603b35a23fe4b4caa678935f8ed8f4de6ca7c
2015-07-07Add upstream code as of Chromium r334380.Daniel Erat
Copy the unchanged source from https://chromium.googlesource.com/chromium/src/base/ as of r334380 (really r334285 a.k.a. 23911a0c in the base/ subtree). Also add MODULE_LICENSE_BSD and copy Chromium's current LICENSE file to NOTICE. Bug: 22317122 Change-Id: I89863bfeca67b3a1ff05e6078f2f9ee4e31c5c99
2015-07-01Initial empty repositoryBill Yi