summaryrefslogtreecommitdiff
path: root/test/stream/meson.build
blob: 005f4aa4996ad5630c93bb155a950b7ec938feca (plain)
1
2
3
4
5
6
7
8
9
10
11
stream_tests = [
    [ 'stream_formats', 'stream_formats.cpp' ],
]

foreach t : stream_tests
  exe = executable(t[0], t[1],
                   dependencies : libcamera_dep,
                   link_with : test_libraries,
                   include_directories : test_includes_internal)
  test(t[0], exe, suite: 'stream')
endforeach
s='lines'>
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2019, Google Inc.
 *
 * libcamera V4L2 API tests
 */

#include "v4l2_videodevice_test.h"

class RequestBuffersTest : public V4L2VideoDeviceTest
{
public:
	RequestBuffersTest()
		: V4L2VideoDeviceTest("vimc", "Raw Capture 0") {}

protected:
	int run()
	{
		const unsigned int bufferCount = 8;

		int ret = capture_->allocateBuffers(bufferCount, &buffers_);
		if (ret != bufferCount)
			return TestFail;

		return TestPass;
	}
};

TEST_REGISTER(RequestBuffersTest)