mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-25 17:45:06 +03:00
test: Rename list test to list-cameras
The list test generates a list binary in the test directory, which conflicts with the C++ std::list header of the same name. The binary gets included instead of the header file, breaking compilation. Rename the test to avoid this. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
parent
8356f8a6ab
commit
03815afdc8
2 changed files with 1 additions and 1 deletions
|
@ -1,49 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* Copyright (C) 2018, Google Inc.
|
||||
*
|
||||
* list.cpp - camera list tests
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <libcamera/camera_manager.h>
|
||||
|
||||
#include "test.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace libcamera;
|
||||
|
||||
class ListTest : public Test
|
||||
{
|
||||
protected:
|
||||
int init()
|
||||
{
|
||||
cm = CameraManager::instance();
|
||||
cm->start();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int run()
|
||||
{
|
||||
unsigned int count = 0;
|
||||
|
||||
for (auto name : cm->list()) {
|
||||
cout << "- " << name << endl;
|
||||
count++;
|
||||
}
|
||||
|
||||
return count ? 0 : -ENODEV;
|
||||
}
|
||||
|
||||
void cleanup()
|
||||
{
|
||||
cm->stop();
|
||||
}
|
||||
|
||||
private:
|
||||
CameraManager *cm;
|
||||
};
|
||||
|
||||
TEST_REGISTER(ListTest)
|
Loading…
Add table
Add a link
Reference in a new issue