[libcamera-devel] [PATCH v4 32/37] tests: ipa_interface_test: Update to use new createIPA
Paul Elder
paul.elder at ideasonboard.com
Fri Nov 6 11:37:02 CET 2020
Update the IPA interface test to use the new createIPA function from
IPAManager. Also declare ProcessManager, as it is not longer globally
defined. Update meson.build to depend on the generated IPA interface
headers.
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
Changes in v4:
- rename libcamera_generated_headers to libcamera_generated_ipa_headers
Changes in v3:
- declare ProcessManager
- add libcamera_generated_headers as dependency to meson
- otherwise test might build before the generated IPA headers and
#include will fail
New in v2
---
test/ipa/ipa_interface_test.cpp | 8 ++++++--
test/ipa/meson.build | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp
index 67488409..db95a9e5 100644
--- a/test/ipa/ipa_interface_test.cpp
+++ b/test/ipa/ipa_interface_test.cpp
@@ -15,12 +15,14 @@
#include <libcamera/event_dispatcher.h>
#include <libcamera/event_notifier.h>
#include <libcamera/ipa/vimc.h>
+#include <libcamera/ipa/ipa_proxy_vimc.h>
#include <libcamera/timer.h>
#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/ipa_manager.h"
#include "libcamera/internal/ipa_module.h"
#include "libcamera/internal/pipeline_handler.h"
+#include "libcamera/internal/process.h"
#include "libcamera/internal/thread.h"
#include "test.h"
@@ -95,7 +97,7 @@ protected:
EventDispatcher *dispatcher = thread()->eventDispatcher();
Timer timer;
- ipa_ = IPAManager::createIPA(pipe_.get(), 0, 0);
+ ipa_ = IPAManager::createIPA<IPAProxyVimc>(pipe_.get(), 0, 0);
if (!ipa_) {
cerr << "Failed to create VIMC IPA interface" << endl;
return TestFail;
@@ -163,8 +165,10 @@ private:
}
}
+ ProcessManager processManager_;
+
std::shared_ptr<PipelineHandler> pipe_;
- std::unique_ptr<IPAProxy> ipa_;
+ std::unique_ptr<IPAProxyVimc> ipa_;
std::unique_ptr<IPAManager> ipaManager_;
enum IPAOperationCode trace_;
EventNotifier *notifier_;
diff --git a/test/ipa/meson.build b/test/ipa/meson.build
index b25bfcf4..fce58a31 100644
--- a/test/ipa/meson.build
+++ b/test/ipa/meson.build
@@ -7,7 +7,7 @@ ipa_test = [
]
foreach t : ipa_test
- exe = executable(t[0], t[1],
+ exe = executable(t[0], [t[1], libcamera_generated_ipa_headers],
dependencies : libcamera_dep,
link_with : test_libraries,
include_directories : test_includes_internal)
--
2.27.0
More information about the libcamera-devel
mailing list