diff options
author | Slava Shklyaev <slavash@google.com> | 2020-05-07 14:13:13 +0100 |
---|---|---|
committer | Slava Shklyaev <slavash@google.com> | 2020-05-07 14:23:40 +0100 |
commit | 19e59551e5aeee51d390108b7b9058a39bfe171f (patch) | |
tree | 97751105b38f056ae8ae2dc47fc4026572272e35 /nn/runtime | |
parent | 768c300f8fa32d9936eeb6f2fc338beeb5f209ea (diff) | |
download | ml-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.cpp | 6 |
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(), }); |