summaryrefslogtreecommitdiffstats
path: root/tests/unit/screen_ui_test.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-07-13 19:39:54 +0200
committerandroid-build-merger <android-build-merger@google.com>2018-07-13 19:39:54 +0200
commit0d8323c4c8bcc39dfeea1210c8500ee442defc18 (patch)
tree3e6a81eb61f07c1dd70dfed0b3cfbaf38071b17e /tests/unit/screen_ui_test.cpp
parentMerge "applypatch: Fix the return type of FreeSpaceForFile()." am: 90c9e4f55c (diff)
parentMerge "tests: Clean up the temporary dirs post-run." (diff)
downloadandroid_bootable_recovery-0d8323c4c8bcc39dfeea1210c8500ee442defc18.tar
android_bootable_recovery-0d8323c4c8bcc39dfeea1210c8500ee442defc18.tar.gz
android_bootable_recovery-0d8323c4c8bcc39dfeea1210c8500ee442defc18.tar.bz2
android_bootable_recovery-0d8323c4c8bcc39dfeea1210c8500ee442defc18.tar.lz
android_bootable_recovery-0d8323c4c8bcc39dfeea1210c8500ee442defc18.tar.xz
android_bootable_recovery-0d8323c4c8bcc39dfeea1210c8500ee442defc18.tar.zst
android_bootable_recovery-0d8323c4c8bcc39dfeea1210c8500ee442defc18.zip
Diffstat (limited to '')
-rw-r--r--tests/unit/screen_ui_test.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/screen_ui_test.cpp b/tests/unit/screen_ui_test.cpp
index 2f4b7b09b..4c0a868f0 100644
--- a/tests/unit/screen_ui_test.cpp
+++ b/tests/unit/screen_ui_test.cpp
@@ -446,8 +446,9 @@ TEST_F(ScreenRecoveryUITest, LoadAnimation_MissingAnimation) {
RETURN_IF_NO_GRAPHICS;
ASSERT_TRUE(ui_->Init(kTestLocale));
- TemporaryDir resource_dir;
- Paths::Get().set_resource_dir(resource_dir.path);
+ // We need a dir that doesn't contain any animation. However, using TemporaryDir will give
+ // leftovers since this is a death test where TemporaryDir::~TemporaryDir() won't be called.
+ Paths::Get().set_resource_dir("/proc/self");
::testing::FLAGS_gtest_death_test_style = "threadsafe";
ASSERT_EXIT(ui_->RunLoadAnimation(), ::testing::KilledBySignal(SIGABRT), "");