summaryrefslogtreecommitdiff
path: root/test/camera-sensor.cpp
AgeCommit message (Collapse)Author
2019-08-11tests: camera-sensor: Test using invalid media bus formatNiklas Söderlund
Linux commit b6c61a6c37317efd ("media: vimc: propagate pixel format in the stream") changes the sensor in the vimc media graph to accept all media bus format currently described in Linux. This prevents the camera-sensor test case to verify that a supported media bus format is selected from a list of defined formats, fix this by using an invalid media bus format in the test case. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-06-12tests: Add CameraSensor class testLaurent Pinchart
Add a test to verify media bus codes, sizes and resolution retrieval through the CameraSensor API based on the Sensor A in the vimc pipeline. Also check that the getFormat() method returns the expected media bus code and size. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
/a> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Copyright (C) 2022, Paul Elder <paul.elder@ideasonboard.com>
#
# raspberrypi_alsc_only.py - Tuning script for raspberrypi, ALSC only

import sys

import libtuning as lt
from libtuning.parsers import RaspberryPiParser
from libtuning.generators import RaspberryPiOutput

from raspberrypi.alsc import ALSC

tuner = lt.Tuner('Raspberry Pi (ALSC only)')
tuner.add(ALSC)
tuner.set_input_parser(RaspberryPiParser())
tuner.set_output_formatter(RaspberryPiOutput())
tuner.set_output_order([ALSC])

if __name__ == '__main__':
    sys.exit(tuner.run(sys.argv))