summaryrefslogtreecommitdiff
path: root/test/meson.build
AgeCommit message (Expand)Author
2019-06-19libcamera: Rename V4L2Device to V4L2VideoDeviceJacopo Mondi
2019-06-19test: stream: Add test for StreamFormatNiklas Söderlund
2019-06-12tests: Add CameraSensor class testLaurent Pinchart
2019-05-23meson: Create and use a dependency for libcamera and its headersLaurent Pinchart
2019-05-21test: ipa: add IPAModule testsPaul Elder
2019-04-18test: geometry: Add tests for Size class comparison operatorsLaurent Pinchart
2019-03-14test: camera: Add read default configuration testNiklas Söderlund
2019-03-01test: v4l2_subdevice: Add format handling testJacopo Mondi
2019-01-23tests: Test event dispatcher interruption by signalLaurent Pinchart
2019-01-22test: pipeline: IPU3: Add IPU3 pipeline testJacopo Mondi
2019-01-17test: v4l2_device: Add test suite and initial testKieran Bingham
2019-01-08test: Add event notifier testLaurent Pinchart
2019-01-08test: Add timer testLaurent Pinchart
2019-01-08test: Add signal/slot testLaurent Pinchart
2019-01-08test: Rename list test to list-camerasLaurent Pinchart
2019-01-02test: Move include definitions to libtestKieran Bingham
2019-01-02test: Use foreach iterators to simplify definitionsKieran Bingham
2019-01-02test: media_device: Move test definitionKieran Bingham
2019-01-02libcamera: Remove libcamera classLaurent Pinchart
2019-01-01test: Move test objects to libtestKieran Bingham
2018-12-31test: Add media device testJacopo Mondi
2018-12-31tests: add test to list all cameras in the systemNiklas Söderlund
2018-12-21tests: Add a base Test classLaurent Pinchart
2018-12-06Overhaul the directory structureLaurent Pinchart
2018-11-28meson: Replace tabs for spacesKieran Bingham
2018-11-22test: Register the initialisation test with mesonKieran Bingham
2018-10-24build: Provide initial meson infrastructureKieran Bingham
(list, buffer); if (!ret) { cerr << "List serialization without info map should have failed" << endl; return TestFail; } if (buffer.overflow() || buffer.offset()) { cerr << "Failed list serialization modified the buffer" << endl; return TestFail; } /* Serialize the control info map. */ size = serializer.binarySize(infoMap); infoData.resize(size); buffer = ByteStreamBuffer(infoData.data(), infoData.size()); ret = serializer.serialize(infoMap, buffer); if (ret < 0) { cerr << "Failed to serialize ControlInfoMap" << endl; return TestFail; } if (buffer.overflow()) { cerr << "Overflow when serializing ControlInfoMap" << endl; return TestFail; } /* Serialize the control list, this should now succeed. */ size = serializer.binarySize(list); listData.resize(size); buffer = ByteStreamBuffer(listData.data(), listData.size()); ret = serializer.serialize(list, buffer); if (ret) { cerr << "Failed to serialize ControlList" << endl; return TestFail; } if (buffer.overflow()) { cerr << "Overflow when serializing ControlList" << endl; return TestFail; } /* * Deserialize the control list, this should fail as the control * info map hasn't been deserialized. */ buffer = ByteStreamBuffer(const_cast<const uint8_t *>(listData.data()), listData.size()); ControlList newList = deserializer.deserialize<ControlList>(buffer); if (!newList.empty()) { cerr << "List deserialization without info map should have failed" << endl; return TestFail; } if (buffer.overflow()) { cerr << "Failed list deserialization modified the buffer" << endl; return TestFail; } /* Deserialize the control info map and verify the contents. */ buffer = ByteStreamBuffer(const_cast<const uint8_t *>(infoData.data()), infoData.size()); ControlInfoMap newInfoMap = deserializer.deserialize<ControlInfoMap>(buffer); if (newInfoMap.empty()) { cerr << "Failed to deserialize ControlInfoMap" << endl; return TestFail; } if (buffer.overflow()) { cerr << "Overflow when deserializing ControlInfoMap" << endl; return TestFail; } if (!equals(infoMap, newInfoMap)) { cerr << "Deserialized map doesn't match original" << endl; return TestFail; } /* Deserialize the control list and verify the contents. */ buffer = ByteStreamBuffer(const_cast<const uint8_t *>(listData.data()), listData.size()); newList = deserializer.deserialize<ControlList>(buffer); if (newList.empty()) { cerr << "Failed to deserialize ControlList" << endl; return TestFail; } if (buffer.overflow()) { cerr << "Overflow when deserializing ControlList" << endl; return TestFail; } if (!equals(list, newList)) { cerr << "Deserialized list doesn't match original" << endl; return TestFail; } return TestPass; } }; TEST_REGISTER(ControlSerializationTest)