diff options
author | Slava Shklyaev <slavash@google.com> | 2020-01-30 17:19:19 +0000 |
---|---|---|
committer | Slava Shklyaev <slavash@google.com> | 2020-02-17 17:57:51 +0000 |
commit | e46c85a8be206d14bb6e8338255e66a283dffdde (patch) | |
tree | e3b52b5f1b97c603df11443bc5f89fb19333b57d /nn/runtime/test/TestGenerated.cpp | |
parent | 19f84c7eb7dfbe60507f84b6275bab0bd70e25ba (diff) | |
download | ml-e46c85a8be206d14bb6e8338255e66a283dffdde.tar.gz |
Port control flow tests to test generator
Original tests: Ib371aeca
Also adds some new tests.
Bug: 148601177
Bug: 136735929
Test: generate_all_tests.sh
Test: NNT_static
Change-Id: Icf402cbd4172163ff3e9a4644804b2ef3dcf0743
Diffstat (limited to 'nn/runtime/test/TestGenerated.cpp')
-rw-r--r-- | nn/runtime/test/TestGenerated.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/nn/runtime/test/TestGenerated.cpp b/nn/runtime/test/TestGenerated.cpp index 85a164dde..da1094cc2 100644 --- a/nn/runtime/test/TestGenerated.cpp +++ b/nn/runtime/test/TestGenerated.cpp @@ -546,8 +546,9 @@ TEST_P(FencedComputeTest, Test) { INSTANTIATE_GENERATED_TEST(GeneratedTests, [](const TestModel& testModel) { return !testModel.expectFailure; }); -INSTANTIATE_GENERATED_TEST(DynamicOutputShapeTest, - [](const TestModel& testModel) { return !testModel.expectFailure; }); +INSTANTIATE_GENERATED_TEST(DynamicOutputShapeTest, [](const TestModel& testModel) { + return !testModel.expectFailure && !testModel.hasScalarOutputs(); +}); INSTANTIATE_GENERATED_TEST(GeneratedValidationTests, [](const TestModel& testModel) { return testModel.expectFailure; }); @@ -558,6 +559,10 @@ INSTANTIATE_GENERATED_TEST(QuantizationCouplingTest, [](const TestModel& testMod }); INSTANTIATE_GENERATED_TEST(DeviceMemoryTest, [](const TestModel& testModel) { + if (!testModel.referenced.empty()) { + // TODO(b/149693818): Add control flow support to DeviceMemoryTest. + return false; + } return !testModel.expectFailure && std::all_of(testModel.main.outputIndexes.begin(), testModel.main.outputIndexes.end(), [&testModel](uint32_t index) { |