test: camera_sensor: Test the model() function
Verify that the sensor model matches the expected value. The whole model extraction heuristic isn't fully tested as that would require being able to inject different entity names. It is still useful as an initial step. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -61,6 +61,12 @@ protected:
|
||||
|
||||
int run()
|
||||
{
|
||||
if (sensor_->model() != "Sensor A") {
|
||||
cerr << "Incorrect sensor model '" << sensor_->model()
|
||||
<< "'" << endl;
|
||||
return TestFail;
|
||||
}
|
||||
|
||||
const std::vector<unsigned int> &codes = sensor_->mbusCodes();
|
||||
auto iter = std::find(codes.begin(), codes.end(),
|
||||
MEDIA_BUS_FMT_ARGB8888_1X32);
|
||||
|
||||
Reference in New Issue
Block a user