summaryrefslogtreecommitdiff
path: root/nn/runtime
diff options
context:
space:
mode:
authorSlava Shklyaev <slavash@google.com>2020-05-07 14:13:13 +0100
committerSlava Shklyaev <slavash@google.com>2020-05-07 14:23:40 +0100
commit19e59551e5aeee51d390108b7b9058a39bfe171f (patch)
tree97751105b38f056ae8ae2dc47fc4026572272e35 /nn/runtime
parent768c300f8fa32d9936eeb6f2fc338beeb5f209ea (diff)
downloadml-19e59551e5aeee51d390108b7b9058a39bfe171f.tar.gz
Skip FailingDriverTest when fallback is disabled
The test does not make sense when partitioning or CPU fallback is disabled. Bug: 155849908 Test: adb shell setprop debug.nn.partition 0 && \ NNT_static --gtest_filter=FailingDriverTest.FailAfterInterpretedWhile Test: adb shell setprop debug.nn.partition 2 && \ NNT_static --gtest_filter=FailingDriverTest.FailAfterInterpretedWhile Change-Id: Ie81eef414de3f767f4dfcf282d39ba63e366057f
Diffstat (limited to 'nn/runtime')
-rw-r--r--nn/runtime/test/TestControlFlowExecution.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/nn/runtime/test/TestControlFlowExecution.cpp b/nn/runtime/test/TestControlFlowExecution.cpp
index 34e4b2923..d345c6f13 100644
--- a/nn/runtime/test/TestControlFlowExecution.cpp
+++ b/nn/runtime/test/TestControlFlowExecution.cpp
@@ -72,12 +72,14 @@ class FailingTestDriver : public SampleDriverPartial {
class FailingDriverTest : public ::testing::Test {
virtual void SetUp() {
- if (DeviceManager::get()->getUseCpuOnly()) {
+ DeviceManager* deviceManager = DeviceManager::get();
+ if (deviceManager->getUseCpuOnly() ||
+ !DeviceManager::partitioningAllowsFallback(deviceManager->getPartitioning())) {
GTEST_SKIP();
}
mTestDevice =
DeviceManager::forTest_makeDriverDevice(kTestDriverName, new FailingTestDriver());
- DeviceManager::get()->forTest_setDevices({
+ deviceManager->forTest_setDevices({
mTestDevice,
DeviceManager::getCpuDevice(),
});