summaryrefslogtreecommitdiff
path: root/test/controls
diff options
context:
space:
mode:
Diffstat (limited to 'test/controls')
-rw-r--r--test/controls/control_list.cpp39
1 files changed, 7 insertions, 32 deletions
diff --git a/test/controls/control_list.cpp b/test/controls/control_list.cpp
index 5af53f64..4d212abd 100644
--- a/test/controls/control_list.cpp
+++ b/test/controls/control_list.cpp
@@ -13,32 +13,22 @@
#include <libcamera/controls.h>
#include "camera_controls.h"
+
+#include "camera_test.h"
#include "test.h"
using namespace std;
using namespace libcamera;
-class ControlListTest : public Test
+class ControlListTest : public CameraTest, public Test
{
-protected:
- int init()
+public:
+ ControlListTest()
+ : CameraTest("VIMC Sensor B")
{
- cm_ = new CameraManager();
-
- if (cm_->start()) {
- cout << "Failed to start camera manager" << endl;
- return TestFail;
- }
-
- camera_ = cm_->get("VIMC Sensor B");
- if (!camera_) {
- cout << "Can not find VIMC camera" << endl;
- return TestSkip;
- }
-
- return TestPass;
}
+protected:
int run()
{
CameraControlValidator validator(camera_.get());
@@ -156,21 +146,6 @@ protected:
return TestPass;
}
-
- void cleanup()
- {
- if (camera_) {
- camera_->release();
- camera_.reset();
- }
-
- cm_->stop();
- delete cm_;
- }
-
-private:
- CameraManager *cm_;
- std::shared_ptr<Camera> camera_;
};
TEST_REGISTER(ControlListTest)