afc4d7cfe7
This CL introduces unit tests to validate the V1_X::utils::Device, *PreparedModel, and *Buffer adapter classes. It does so by mocking the underlying HIDL interface in order to simulate a driver returning bad data, HIDL transport failures, and service crashes. Note that the purpose of these new tests is to validate the adapter classes themselves, not the HIDL interfaces they use. For example, because nn::IPreparedModel does not currently define a method for configuring a burst execution, V1_[23]::utils::PreparedModel similarly does not use hardware::neuralnetworks::V1_[23]::IPreparedModel's configureExecutionBurst method. This CL also introduces unit tests to validate the utils::Resilient* adapter classes, and mocks DEAD_OBJECT failures to ensure that the underyling object can be recovered appropriately. Bug: 163801800 Test: mma Test: atest neuralnetworks_utils_hal_common_test Test: atest neuralnetworks_utils_hal_1_[0-3]_test Change-Id: I2c79865bf666d3f4bf53061ff5090746403583e9
65 lines
2 KiB
Text
65 lines
2 KiB
Text
{
|
|
"presubmit": [
|
|
{
|
|
"name": "neuralnetworks_utils_hal_common_test"
|
|
},
|
|
{
|
|
"name": "neuralnetworks_utils_hal_1_0_test"
|
|
},
|
|
{
|
|
"name": "neuralnetworks_utils_hal_1_1_test"
|
|
},
|
|
{
|
|
"name": "neuralnetworks_utils_hal_1_2_test"
|
|
},
|
|
{
|
|
"name": "neuralnetworks_utils_hal_1_3_test"
|
|
},
|
|
{
|
|
"name": "VtsHalNeuralnetworksV1_0TargetTest",
|
|
"options": [
|
|
{
|
|
// Do not use any sample driver except sample-all in order to reduce
|
|
// testing time. The other sample drivers (fast-float, quant, etc.)
|
|
// are subsets of sample-all.
|
|
"include-filter": "-*sample_float_fast*:*sample_float_slow*:*sample_minimal*:*sample_quant*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "VtsHalNeuralnetworksV1_1TargetTest",
|
|
"options": [
|
|
{
|
|
// Do not use any sample driver except sample-all in order to reduce
|
|
// testing time. The other sample drivers (fast-float, quant, etc.)
|
|
// are subsets of sample-all.
|
|
"include-filter": "-*sample_float_fast*:*sample_float_slow*:*sample_minimal*:*sample_quant*"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"presubmit-large": [
|
|
{
|
|
"name": "VtsHalNeuralnetworksV1_2TargetTest",
|
|
"options": [
|
|
{
|
|
// Do not use any sample driver except sample-all in order to reduce
|
|
// testing time. The other sample drivers (fast-float, quant, etc.)
|
|
// are subsets of sample-all.
|
|
"include-filter": "-*sample_float_fast*:*sample_float_slow*:*sample_minimal*:*sample_quant*"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "VtsHalNeuralnetworksV1_3TargetTest",
|
|
"options": [
|
|
{
|
|
// Do not use any sample driver except sample-all in order to reduce
|
|
// testing time. The other sample drivers (fast-float, quant, etc.)
|
|
// are subsets of sample-all.
|
|
"include-filter": "-*sample_float_fast*:*sample_float_slow*:*sample_minimal*:*sample_quant*"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|