From 03815afdc8dcc41c4462ca753a1d4fb869748a8e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 5 Jan 2019 02:51:52 +0200 Subject: test: Rename list test to list-cameras MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Niklas Söderlund --- test/list-cameras.cpp | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ test/list.cpp | 49 ------------------------------------------------- test/meson.build | 2 +- 3 files changed, 50 insertions(+), 50 deletions(-) create mode 100644 test/list-cameras.cpp delete mode 100644 test/list.cpp diff --git a/test/list-cameras.cpp b/test/list-cameras.cpp new file mode 100644 index 00000000..e2026c99 --- /dev/null +++ b/test/list-cameras.cpp @@ -0,0 +1,49 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Copyright (C) 2018, Google Inc. + * + * list.cpp - camera list tests + */ + +#include + +#include + +#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) diff --git a/test/list.cpp b/test/list.cpp deleted file mode 100644 index e2026c99..00000000 --- a/test/list.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * Copyright (C) 2018, Google Inc. - * - * list.cpp - camera list tests - */ - -#include - -#include - -#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) diff --git a/test/meson.build b/test/meson.build index 184a7eeb..30350d22 100644 --- a/test/meson.build +++ b/test/meson.build @@ -3,7 +3,7 @@ subdir('libtest') subdir('media_device') public_tests = [ - ['list', 'list.cpp'], + ['list-cameras', 'list-cameras.cpp'], ] internal_tests = [ -- cgit v1.2.1