diff options
author | Alex Deymo <deymo@google.com> | 2016-02-10 16:08:11 -0800 |
---|---|---|
committer | Alex Deymo <deymo@google.com> | 2016-02-17 00:12:30 +0000 |
commit | 80f70ff45f8ea9a679c0c3ed0dc143dd2fe2b63e (patch) | |
tree | 761f1b9821f84d8e2470cb67772ebb03cfb47f3f /payload_consumer/filesystem_verifier_action_unittest.cc | |
parent | b3f699a131e96c326b675b465ce02daaa7fe7c56 (diff) |
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
Diffstat (limited to 'payload_consumer/filesystem_verifier_action_unittest.cc')
-rw-r--r-- | payload_consumer/filesystem_verifier_action_unittest.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/payload_consumer/filesystem_verifier_action_unittest.cc b/payload_consumer/filesystem_verifier_action_unittest.cc index 10daaa87..cdf7fc04 100644 --- a/payload_consumer/filesystem_verifier_action_unittest.cc +++ b/payload_consumer/filesystem_verifier_action_unittest.cc @@ -120,7 +120,7 @@ void StartProcessorInRunLoop(ActionProcessor* processor, // failures and whether or not they are due to the test setup or an inherent // issue with the chroot environment, library versions we use, etc. TEST_F(FilesystemVerifierActionTest, DISABLED_RunAsRootSimpleTest) { - ASSERT_EQ(0, getuid()); + ASSERT_EQ(0U, getuid()); bool test = DoTest(false, false, VerifierMode::kComputeSourceHash); EXPECT_TRUE(test); if (!test) @@ -309,18 +309,18 @@ TEST_F(FilesystemVerifierActionTest, NonExistentDriveTest) { } TEST_F(FilesystemVerifierActionTest, RunAsRootVerifyHashTest) { - ASSERT_EQ(0, getuid()); + ASSERT_EQ(0U, getuid()); EXPECT_TRUE(DoTest(false, false, VerifierMode::kVerifyTargetHash)); EXPECT_TRUE(DoTest(false, false, VerifierMode::kComputeSourceHash)); } TEST_F(FilesystemVerifierActionTest, RunAsRootVerifyHashFailTest) { - ASSERT_EQ(0, getuid()); + ASSERT_EQ(0U, getuid()); EXPECT_TRUE(DoTest(false, true, VerifierMode::kVerifyTargetHash)); } TEST_F(FilesystemVerifierActionTest, RunAsRootTerminateEarlyTest) { - ASSERT_EQ(0, getuid()); + ASSERT_EQ(0U, getuid()); EXPECT_TRUE(DoTest(true, false, VerifierMode::kVerifyTargetHash)); // TerminateEarlyTest may leak some null callbacks from the Stream class. while (loop_.RunOnce(false)) {} @@ -366,13 +366,13 @@ TEST_F(FilesystemVerifierActionTest, loop_.Run(); install_plan = collector_action.object(); - ASSERT_EQ(2, install_plan.partitions.size()); + ASSERT_EQ(2U, install_plan.partitions.size()); // When computing the size of the rootfs on legacy delta updates we use the // size of the filesystem, but when updating the kernel we use the whole // partition. - EXPECT_EQ(10 * 1024 * 1024, install_plan.partitions[0].source_size); + EXPECT_EQ(10U << 20, install_plan.partitions[0].source_size); EXPECT_EQ(kLegacyPartitionNameRoot, install_plan.partitions[0].name); - EXPECT_EQ(20 * 1024 * 1024, install_plan.partitions[1].source_size); + EXPECT_EQ(20U << 20, install_plan.partitions[1].source_size); EXPECT_EQ(kLegacyPartitionNameKernel, install_plan.partitions[1].name); } |