Message ID | 20200205130420.8736-6-kieran.bingham@ideasonboard.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Hi Kieran, Thank you for the patch. On Wed, Feb 05, 2020 at 01:04:20PM +0000, Kieran Bingham wrote: > 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 provided through the > RUNPATH, we can remove the redundant setting of the > LIBCAMERA_IPA_MODULE_PATH for tests. > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> I really like this. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > test/libtest/test.cpp | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/test/libtest/test.cpp b/test/libtest/test.cpp > index 333d2160e276..6cd3fbe6df06 100644 > --- a/test/libtest/test.cpp > +++ b/test/libtest/test.cpp > @@ -21,10 +21,6 @@ int Test::execute() > { > int ret; > > - ret = setenv("LIBCAMERA_IPA_MODULE_PATH", "src/ipa", 1); > - if (ret) > - return errno; > - > ret = setenv("LIBCAMERA_IPA_PROXY_PATH", "src/libcamera/proxy/worker", 1); > if (ret) > return errno;
diff --git a/test/libtest/test.cpp b/test/libtest/test.cpp index 333d2160e276..6cd3fbe6df06 100644 --- a/test/libtest/test.cpp +++ b/test/libtest/test.cpp @@ -21,10 +21,6 @@ int Test::execute() { int ret; - ret = setenv("LIBCAMERA_IPA_MODULE_PATH", "src/ipa", 1); - if (ret) - return errno; - ret = setenv("LIBCAMERA_IPA_PROXY_PATH", "src/libcamera/proxy/worker", 1); if (ret) return errno;
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 provided through the RUNPATH, we can remove the redundant setting of the LIBCAMERA_IPA_MODULE_PATH for tests. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- test/libtest/test.cpp | 4 ---- 1 file changed, 4 deletions(-)