From 19e59551e5aeee51d390108b7b9058a39bfe171f Mon Sep 17 00:00:00 2001 From: Slava Shklyaev Date: Thu, 7 May 2020 14:13:13 +0100 Subject: 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 --- nn/runtime/test/TestControlFlowExecution.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nn/runtime') 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(), }); -- cgit v1.2.3