hardware/interfaces
修订版 | ae62942b1c3ac8e74a1490ec7eb67ca6bca13371 (tree) |
---|---|
时间 | 2017-10-18 07:37:56 |
作者 | TreeHugger Robot <treehugger-gerrit@goog...> |
Commiter | Android (Google) Code Review |
Merge "bug fix: during fatal fails bypass freeNode() calls" into oc-mr1-dev
@@ -230,6 +230,10 @@ class AudioDecHidlTest : public ::testing::VtsHalHidlTargetTestBase { | ||
230 | 230 | |
231 | 231 | virtual void TearDown() override { |
232 | 232 | if (omxNode != nullptr) { |
233 | + // If you have encountered a fatal failure, it is possible that | |
234 | + // freeNode() will not go through. Instead of hanging the app. | |
235 | + // let it pass through and report errors | |
236 | + if (::testing::Test::HasFatalFailure()) return; | |
233 | 237 | EXPECT_TRUE((omxNode->freeNode()).isOk()); |
234 | 238 | omxNode = nullptr; |
235 | 239 | } |
@@ -216,6 +216,10 @@ class AudioEncHidlTest : public ::testing::VtsHalHidlTargetTestBase { | ||
216 | 216 | |
217 | 217 | virtual void TearDown() override { |
218 | 218 | if (omxNode != nullptr) { |
219 | + // If you have encountered a fatal failure, it is possible that | |
220 | + // freeNode() will not go through. Instead of hanging the app. | |
221 | + // let it pass through and report errors | |
222 | + if (::testing::Test::HasFatalFailure()) return; | |
219 | 223 | EXPECT_TRUE((omxNode->freeNode()).isOk()); |
220 | 224 | omxNode = nullptr; |
221 | 225 | } |
@@ -191,6 +191,10 @@ class ComponentHidlTest : public ::testing::VtsHalHidlTargetTestBase { | ||
191 | 191 | |
192 | 192 | virtual void TearDown() override { |
193 | 193 | if (omxNode != nullptr) { |
194 | + // If you have encountered a fatal failure, it is possible that | |
195 | + // freeNode() will not go through. Instead of hanging the app. | |
196 | + // let it pass through and report errors | |
197 | + if (::testing::Test::HasFatalFailure()) return; | |
194 | 198 | EXPECT_TRUE((omxNode->freeNode()).isOk()); |
195 | 199 | omxNode = nullptr; |
196 | 200 | } |
@@ -232,6 +232,10 @@ class VideoDecHidlTest : public ::testing::VtsHalHidlTargetTestBase { | ||
232 | 232 | |
233 | 233 | virtual void TearDown() override { |
234 | 234 | if (omxNode != nullptr) { |
235 | + // If you have encountered a fatal failure, it is possible that | |
236 | + // freeNode() will not go through. Instead of hanging the app. | |
237 | + // let it pass through and report errors | |
238 | + if (::testing::Test::HasFatalFailure()) return; | |
235 | 239 | EXPECT_TRUE((omxNode->freeNode()).isOk()); |
236 | 240 | omxNode = nullptr; |
237 | 241 | } |
@@ -243,6 +243,10 @@ class VideoEncHidlTest : public ::testing::VtsHalHidlTargetTestBase { | ||
243 | 243 | |
244 | 244 | virtual void TearDown() override { |
245 | 245 | if (omxNode != nullptr) { |
246 | + // If you have encountered a fatal failure, it is possible that | |
247 | + // freeNode() will not go through. Instead of hanging the app. | |
248 | + // let it pass through and report errors | |
249 | + if (::testing::Test::HasFatalFailure()) return; | |
246 | 250 | EXPECT_TRUE((omxNode->freeNode()).isOk()); |
247 | 251 | omxNode = nullptr; |
248 | 252 | } |