From a6de9030893753e5428ee912fe7c52fbf93febd1 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 27 Apr 2020 02:36:18 +0300 Subject: ipa: Pass IPA initialization settings to IPAInterface::init() Add a new IPASettings class to pass IPA initialization settings through the IPAInterface::init() method. The settings currently only contain the name of a configuration file, and are expected to be extended later. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- test/ipa/ipa_wrappers_test.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'test/ipa/ipa_wrappers_test.cpp') diff --git a/test/ipa/ipa_wrappers_test.cpp b/test/ipa/ipa_wrappers_test.cpp index fae1d56b..21bf51a2 100644 --- a/test/ipa/ipa_wrappers_test.cpp +++ b/test/ipa/ipa_wrappers_test.cpp @@ -43,8 +43,14 @@ public: { } - int init() override + int init(const IPASettings &settings) override { + if (settings.configurationFile != "/ipa/configuration/file") { + cerr << "init(): Invalid configuration file" << endl; + report(Op_init, TestFail); + return 0; + } + report(Op_init, TestPass); return 0; } @@ -339,7 +345,10 @@ protected: * Test init(), start() and stop() last to ensure nothing in the * wrappers or serializer depends on them being called first. */ - ret = INVOKE(init); + IPASettings settings{ + .configurationFile = "/ipa/configuration/file" + }; + ret = INVOKE(init, settings); if (ret == TestFail) { cerr << "Failed to run init()"; return TestFail; -- cgit v1.2.1