summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-06-06 08:29:38 +0200
committerandroid-build-merger <android-build-merger@google.com>2018-06-06 08:29:38 +0200
commit69fdcf5bacdbf2b3f6b29150a2eae2cc5ad4df4e (patch)
treec64cb9df8f56bf05f40dc60c9ee0c7bdabff80fb
parentMerge "updater_sample: Add UI docs to README" am: e36b6ec97c am: 321a7134e9 (diff)
parentMerge "tests: Specify the death test style to avoid flakiness." am: 878d5a77f0 (diff)
downloadandroid_bootable_recovery-69fdcf5bacdbf2b3f6b29150a2eae2cc5ad4df4e.tar
android_bootable_recovery-69fdcf5bacdbf2b3f6b29150a2eae2cc5ad4df4e.tar.gz
android_bootable_recovery-69fdcf5bacdbf2b3f6b29150a2eae2cc5ad4df4e.tar.bz2
android_bootable_recovery-69fdcf5bacdbf2b3f6b29150a2eae2cc5ad4df4e.tar.lz
android_bootable_recovery-69fdcf5bacdbf2b3f6b29150a2eae2cc5ad4df4e.tar.xz
android_bootable_recovery-69fdcf5bacdbf2b3f6b29150a2eae2cc5ad4df4e.tar.zst
android_bootable_recovery-69fdcf5bacdbf2b3f6b29150a2eae2cc5ad4df4e.zip
-rw-r--r--tests/unit/rangeset_test.cpp3
-rw-r--r--tests/unit/screen_ui_test.cpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/rangeset_test.cpp b/tests/unit/rangeset_test.cpp
index 7ae193e18..fc72f2f6d 100644
--- a/tests/unit/rangeset_test.cpp
+++ b/tests/unit/rangeset_test.cpp
@@ -209,6 +209,7 @@ TEST(RangeSetTest, GetBlockNumber) {
ASSERT_EQ(static_cast<size_t>(6), rs.GetBlockNumber(5));
ASSERT_EQ(static_cast<size_t>(9), rs.GetBlockNumber(8));
+ ::testing::FLAGS_gtest_death_test_style = "threadsafe";
// Out of bound.
ASSERT_EXIT(rs.GetBlockNumber(9), ::testing::KilledBySignal(SIGABRT), "");
}
@@ -284,6 +285,8 @@ TEST(SortedRangeSetTest, file_range) {
ASSERT_EQ(static_cast<size_t>(10), rs.GetOffsetInRangeSet(4106));
ASSERT_EQ(static_cast<size_t>(40970), rs.GetOffsetInRangeSet(4096 * 16 + 10));
+
+ ::testing::FLAGS_gtest_death_test_style = "threadsafe";
// block#10 not in range.
ASSERT_EXIT(rs.GetOffsetInRangeSet(40970), ::testing::KilledBySignal(SIGABRT), "");
}
diff --git a/tests/unit/screen_ui_test.cpp b/tests/unit/screen_ui_test.cpp
index 25623074c..2179b729f 100644
--- a/tests/unit/screen_ui_test.cpp
+++ b/tests/unit/screen_ui_test.cpp
@@ -408,5 +408,7 @@ TEST_F(ScreenRecoveryUITest, LoadAnimation_MissingAnimation) {
ASSERT_TRUE(ui_->Init(kTestLocale));
TemporaryDir resource_dir;
Paths::Get().set_resource_dir(resource_dir.path);
+
+ ::testing::FLAGS_gtest_death_test_style = "threadsafe";
ASSERT_EXIT(ui_->RunLoadAnimation(), ::testing::KilledBySignal(SIGABRT), "");
}