summaryrefslogtreecommitdiff
path: root/test/ipa
diff options
context:
space:
mode:
Diffstat (limited to 'test/ipa')
-rw-r--r--test/ipa/ipa_interface_test.cpp22
-rw-r--r--test/ipa/ipa_wrappers_test.cpp33
2 files changed, 52 insertions, 3 deletions
diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp
index cafc249b..22f9ca41 100644
--- a/test/ipa/ipa_interface_test.cpp
+++ b/test/ipa/ipa_interface_test.cpp
@@ -109,6 +109,28 @@ protected:
return TestFail;
}
+ /* Test start of IPA module. */
+ ipa_->start();
+ timer.start(1000);
+ while (timer.isRunning() && trace_ != IPAOperationStart)
+ dispatcher->processEvents();
+
+ if (trace_ != IPAOperationStart) {
+ cerr << "Failed to test IPA start sequence" << endl;
+ return TestFail;
+ }
+
+ /* Test stop of IPA module. */
+ ipa_->stop();
+ timer.start(1000);
+ while (timer.isRunning() && trace_ != IPAOperationStop)
+ dispatcher->processEvents();
+
+ if (trace_ != IPAOperationStop) {
+ cerr << "Failed to test IPA stop sequence" << endl;
+ return TestFail;
+ }
+
return TestPass;
}
diff --git a/test/ipa/ipa_wrappers_test.cpp b/test/ipa/ipa_wrappers_test.cpp
index 1ae17811..fae1d56b 100644
--- a/test/ipa/ipa_wrappers_test.cpp
+++ b/test/ipa/ipa_wrappers_test.cpp
@@ -27,6 +27,8 @@ using namespace std;
enum Operation {
Op_init,
+ Op_start,
+ Op_stop,
Op_configure,
Op_mapBuffers,
Op_unmapBuffers,
@@ -47,6 +49,17 @@ public:
return 0;
}
+ int start() override
+ {
+ report(Op_start, TestPass);
+ return 0;
+ }
+
+ void stop() override
+ {
+ report(Op_stop, TestPass);
+ }
+
void configure(const std::map<unsigned int, IPAStream> &streamConfig,
const std::map<unsigned int, const ControlInfoMap &> &entityControls) override
{
@@ -323,12 +336,26 @@ protected:
return TestFail;
/*
- * Test init() last to ensure nothing in the wrappers or
- * serializer depends on init() being called first.
+ * Test init(), start() and stop() last to ensure nothing in the
+ * wrappers or serializer depends on them being called first.
*/
ret = INVOKE(init);
- if (ret == TestFail)
+ if (ret == TestFail) {
+ cerr << "Failed to run init()";
return TestFail;
+ }
+
+ ret = INVOKE(start);
+ if (ret == TestFail) {
+ cerr << "Failed to run start()";
+ return TestFail;
+ }
+
+ ret = INVOKE(stop);
+ if (ret == TestFail) {
+ cerr << "Failed to run stop()";
+ return TestFail;
+ }
return TestPass;
}