summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Expand)Author
2019-06-19libcamera: Rename V4L2Device to V4L2VideoDeviceJacopo Mondi
2019-06-19test: stream: Add test for StreamFormatNiklas Söderlund
2019-06-19libcamera: v4l2_subdevice: Replace FormatEnum with ImageFormatsNiklas Söderlund
2019-06-12tests: Add CameraSensor class testLaurent Pinchart
2019-06-11test: camera: Increase runtime for capture testNiklas Söderlund
2019-06-10test: camera: Fix initialisationKieran Bingham
2019-06-05libcamera: test: remove test IPA and use dummy IPA insteadPaul Elder
2019-06-05libcamera: ipa_manager: implement class for managing IPA modulesPaul Elder
2019-06-05libcamera: ipa_module_info: update struct to allow IPA matchingPaul Elder
2019-06-05libcamera: ipa_interface: add headerPaul Elder
2019-05-25tests: list_formats: Fix argument names and add constNiklas Söderlund
2019-05-23meson: Create and use a dependency for libcamera and its headersLaurent Pinchart
2019-05-23meson: Fix coding style in meson.build filesLaurent Pinchart
2019-05-23libcamera: camera: Add a validation API to the CameraConfiguration classLaurent Pinchart
2019-05-23libcamera: camera: Return a pointer from generateConfiguration()Laurent Pinchart
2019-05-23libcamera: Refactor the camera configuration storage and APILaurent Pinchart
2019-05-23libcamera: Use stream roles directly instead of StreamUsageLaurent Pinchart
2019-05-23libcamera: camera: Rename configureStreams() and streamConfiguration()Laurent Pinchart
2019-05-21test: ipa: add IPAModule testsPaul Elder
2019-05-17test: v4l2_device: Switch most tests to vimcNiklas Söderlund
2019-05-17test: v4l2_device: Reset media links and set a resolutionNiklas Söderlund
2019-05-17test: v4l2_device: Allow each test to specify which device and entity to testNiklas Söderlund
2019-05-17test: v4l2_device: Implement functions inside class definition in cpp filesNiklas Söderlund
2019-05-17test: v4l2_device: Order class sectionsNiklas Söderlund
2019-05-17test: media_device: Add test for acquire() and release()Niklas Söderlund
2019-05-17test: media_device: Create a common MediaDeviceTest base classNiklas Söderlund
2019-05-17libcamera: media_device: Handle media device fd in acquire() and release()Niklas Söderlund
2019-05-17libcamera: media_device: Open and close media device inside populate()Niklas Söderlund
2019-05-17libcamera: Always check return value of MediaDevice::acquire()Niklas Söderlund
2019-04-30test: Unify naming of configurations in testsLaurent Pinchart
2019-04-30libcamera: Use the Size class through libcameraLaurent Pinchart
2019-04-29libcamera: Don't ignore the return value of read() and write()Laurent Pinchart
2019-04-27test: signal: Exercise the signal delivery code paths for ObjectLaurent Pinchart
2019-04-26test: v4l2_subdevice: Remove std::move() that prevents copy elisionLaurent Pinchart
2019-04-18libcamera: v4l2_subdevice: Add method to retrieve the media entityLaurent Pinchart
2019-04-18test: geometry: Add tests for Size class comparison operatorsLaurent Pinchart
2019-04-18libcamera: geometry: Use Size to store min and max in SizeRangeLaurent Pinchart
2019-04-09libcamera: Switch to CameraConfigurationNiklas Söderlund
2019-04-05libcamera: camera: Add support for stream usagesNiklas Söderlund
2019-04-05libcamera: Make geometry.h a public headerNiklas Söderlund
2019-04-04test: camera: Remove test for bad Stream IDsNiklas Söderlund
2019-04-04test: camera: Remove streams argument from configurationValid()Niklas Söderlund
2019-04-02libcamera: v4l2_subdevice: Rename deviceName() methodJacopo Mondi
2019-03-14test: camera: Add state machine testNiklas Söderlund
2019-03-14test: camera: Add capture testNiklas Söderlund
2019-03-14test: camera: Add setting of configuration testNiklas Söderlund
2019-03-14test: camera: Add read default configuration testNiklas Söderlund
2019-03-02test: v4l2_subdevice: Add ListFormat testJacopo Mondi
2019-03-01test: v4l2_device: Add format handling testJacopo Mondi
2019-03-01test: v4l2_subdevice: Add format handling testJacopo Mondi
>*[(gtestFlags.size() + 2)]; if (!argv) return -ENOMEM; argv[0] = arg0; argc++; if (options.isSet(OptList)) { argv[argc] = const_cast<char *>(gtestFlags.at("list").c_str()); argc++; } if (options.isSet(OptFilter)) { /* * The filter flag needs to be passed as a single parameter, in * the format --gtest_filter=filterStr */ filterParam = gtestFlags.at("filter") + "=" + static_cast<const std::string &>(options[OptFilter]); argv[argc] = const_cast<char *>(filterParam.c_str()); argc++; } argv[argc] = nullptr; ::testing::InitGoogleTest(&argc, argv); delete[] argv; return 0; } static int initGtest(char *arg0, OptionsParser::Options options) { int ret = initGtestParameters(arg0, options); if (ret) return ret; testing::UnitTest::GetInstance()->listeners().Append(new ThrowListener); return 0; } static int parseOptions(int argc, char **argv, OptionsParser::Options *options) { OptionsParser parser; parser.addOption(OptCamera, OptionString, "Specify which camera to operate on, by id", "camera", ArgumentRequired, "camera"); parser.addOption(OptList, OptionNone, "List all tests and exit", "list"); parser.addOption(OptFilter, OptionString, "Specify which tests to run", "filter", ArgumentRequired, "filter"); parser.addOption(OptHelp, OptionNone, "Display this help message", "help"); *options = parser.parse(argc, argv); if (!options->valid()) return -EINVAL; if (options->isSet(OptHelp)) { parser.usage(); std::cerr << "Further options from Googletest can be passed as environment variables" << std::endl; return -EINTR; } return 0; } int main(int argc, char **argv) { OptionsParser::Options options; int ret = parseOptions(argc, argv, &options); if (ret == -EINTR) return EXIT_SUCCESS; if (ret < 0) return EXIT_FAILURE; std::unique_ptr<CameraManager> cm = std::make_unique<CameraManager>(); /* No need to initialize the camera if we'll just list tests */ if (!options.isSet(OptList)) { ret = initCamera(cm.get(), options); if (ret) return ret; } ret = initGtest(argv[0], options); if (ret) return ret; ret = RUN_ALL_TESTS(); if (!options.isSet(OptList)) cm->stop(); return ret; }