new file mode 100644
@@ -0,0 +1,43 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (C) 2019, Google Inc.
+ *
+ * load-so.cpp - loading .so tests
+ */
+
+#include <iostream>
+#include <string.h>
+
+#include "ipa_module.h"
+#include "ipa_manager.h"
+
+#include "test.h"
+
+using namespace std;
+using namespace libcamera;
+
+class IPAManagerTest : public Test
+{
+protected:
+ int run() override
+ {
+ IPAManager *ipam = new IPAManager();
+
+ ipam->addDir("test/ipa");
+
+ struct IPAModuleInfo info;
+ info.ipaAPIVersion = 1;
+ info.pipelineVersion = 8999;
+ strcpy(info.pipelineName, "bleep");
+ const IPAModule *ipa = ipam->acquireIPA(info);
+
+ if (!ipa || strcmp(ipa->info().name, "It's under nine thousand!")) {
+ cerr << "failed to acquire IPA" << endl;
+ return TestFail;
+ }
+
+ return TestPass;
+ }
+};
+
+TEST_REGISTER(IPAManagerTest)
@@ -9,7 +9,8 @@ foreach m : ipa_modules_sources
endforeach
ipa_test = [
- ['ipa_test', 'ipa_test.cpp'],
+ ['ipa_test', 'ipa_test.cpp'],
+ ['ipa_manager_test', 'ipa_manager_test.cpp'],
]
foreach t : ipa_test
Add simple test to test IPA module acquiring through IPAManager. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> --- test/ipa/ipa_manager_test.cpp | 43 +++++++++++++++++++++++++++++++++++ test/ipa/meson.build | 3 ++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 test/ipa/ipa_manager_test.cpp