summaryrefslogtreecommitdiff
path: root/test/libtest/test.cpp
AgeCommit message (Collapse)Author
11 dayslibcamera: Drop file name from header comment blocksLaurent Pinchart
Source files in libcamera start by a comment block header, which includes the file name and a one-line description of the file contents. While the latter is useful to get a quick overview of the file contents at a glance, the former is mostly a source of inconvenience. The name in the comments can easily get out of sync with the file name when files are renamed, and copy & paste during development have often lead to incorrect names being used to start with. Readers of the source code are expected to know which file they're looking it. Drop the file name from the header comment block. The change was generated with the following script: ---------------------------------------- dirs="include/libcamera src test utils" declare -rA patterns=( ['c']=' \* ' ['cpp']=' \* ' ['h']=' \* ' ['py']='# ' ['sh']='# ' ) for ext in ${!patterns[@]} ; do files=$(for dir in $dirs ; do find $dir -name "*.${ext}" ; done) pattern=${patterns[${ext}]} for file in $files ; do name=$(basename ${file}) sed -i "s/^\(${pattern}\)${name} - /\1/" "$file" done done ---------------------------------------- This misses several files that are out of sync with the comment block header. Those will be addressed separately and manually. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
2021-12-01test: Store path to the test executable in Test classLaurent Pinchart
Store the path to the test executable, found in argv[0], in the Test instance. This can be useful for tests that need to fork processes. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-03-18tests: remove IPA_PROXY_PATH environment variableKaaira Gupta
The tests declare a hard-coded LIBCAMERA_IPA_PROXY_PATH to allow tests to run from tests-suite. Now that the proxy path is determined at runtime, we can remove the redundant setting of LIBCAMERA_IPA_PROXY_PATH for tests. Signed-off-by: Kaaira Gupta <kgupta@es.iitr.ac.in> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2020-02-24tests: Remove IPA_MODULE_PATH environment variableKieran Bingham
The tests declare a hard-coded LIBCAMERA_IPA_MODULE_PATH to allow tests to run from the test-suite. This requires tests to be run only from the root of the build directory, otherwise (for example, by running in their local directory) they will not be able to correctly locate the IPA modules. Now that the build path for the IPA manager is determined at runtime we can remove the redundant setting of the LIBCAMERA_IPA_MODULE_PATH for tests. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-07-12libcamera: add IPA proxyPaul Elder
Add an IPAProxy class whose implementations will act as a proxy between a pipeline handler and an isolated IPA interface. Also add an IPAProxyFactory that will construct the IPAProxy implementations as necessary. Update Doxygen to ignore the directory where IPAProxy implementations will reside. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-06-05libcamera: ipa_manager: implement class for managing IPA modulesPaul Elder
IPAManager is a class that will search in given directories for IPA modules, and will load them into a list. It also provides an interface for pipeline handlers to acquire an IPA. A meson build file for the IPAs is added, which also specifies a hard-coded path for where to load the IPAs from in the installation directory. More paths can be specified with the environment variable LIBCAMERA_IPA_MODULE_PATH, with the same syntax as the regular PATH environment variable. Make the test framework set this environment variable. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-01test: libtest: Return all non-zero init valuesKieran Bingham
A skipped test is currently defined as returning 77. If this is returned by the init stage, currently the execute call will continue on to the run stage. Correct this such that any non-zero return code from the init phase will abort the test. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2019-01-01test: Move test objects to libtestKieran Bingham
Create a subdirectory to contain the libtest helper library. Define two variables to clarify when tests are aimed at public or internal components. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>