Merge branch 'development' into mueller/expand-serialize-if

This commit is contained in:
Robin Müller 2022-07-25 15:08:04 +02:00
commit 8f07133e2c
16 changed files with 18 additions and 20 deletions

View File

@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
# [unreleased] # [unreleased]
# [v5.0.0] # [v5.0.0] 25.07.2022
## Changes ## Changes

View File

@ -13,7 +13,7 @@ list(APPEND CMAKE_MODULE_PATH
# Version file handling # # Version file handling #
# ############################################################################## # ##############################################################################
set(FSFW_VERSION_IF_GIT_FAILS 4) set(FSFW_VERSION_IF_GIT_FAILS 5)
set(FSFW_SUBVERSION_IF_GIT_FAILS 0) set(FSFW_SUBVERSION_IF_GIT_FAILS 0)
set(FSFW_REVISION_IF_GIT_FAILS 0) set(FSFW_REVISION_IF_GIT_FAILS 0)

View File

@ -16,8 +16,7 @@ cpp_format="clang-format"
file_selectors="-iname *.h -o -iname *.cpp -o -iname *.c -o -iname *.tpp" file_selectors="-iname *.h -o -iname *.cpp -o -iname *.c -o -iname *.tpp"
if command -v ${cpp_format} &> /dev/null; then if command -v ${cpp_format} &> /dev/null; then
find ./src ${file_selectors} | xargs ${cpp_format} --style=file -i find ./src ${file_selectors} | xargs ${cpp_format} --style=file -i
find ./hal ${file_selectors} | xargs ${cpp_format} --style=file -i find ./unittests ${file_selectors} | xargs ${cpp_format} --style=file -i
find ./tests ${file_selectors} | xargs ${cpp_format} --style=file -i
else else
echo "No ${cpp_format} tool found, not formatting C++/C files" echo "No ${cpp_format} tool found, not formatting C++/C files"
fi fi

View File

@ -2,6 +2,7 @@
#include <catch2/catch_test_macros.hpp> #include <catch2/catch_test_macros.hpp>
#include <cstring> #include <cstring>
#include "CatchDefinitions.h"
#include "fsfw/cfdp/FileSize.h" #include "fsfw/cfdp/FileSize.h"
#include "fsfw/cfdp/pdu/FileDirectiveDeserializer.h" #include "fsfw/cfdp/pdu/FileDirectiveDeserializer.h"
#include "fsfw/cfdp/pdu/FileDirectiveSerializer.h" #include "fsfw/cfdp/pdu/FileDirectiveSerializer.h"
@ -9,7 +10,6 @@
#include "fsfw/cfdp/pdu/HeaderSerializer.h" #include "fsfw/cfdp/pdu/HeaderSerializer.h"
#include "fsfw/globalfunctions/arrayprinter.h" #include "fsfw/globalfunctions/arrayprinter.h"
#include "fsfw/serialize/SerializeAdapter.h" #include "fsfw/serialize/SerializeAdapter.h"
#include "CatchDefinitions.h"
TEST_CASE("CFDP Base", "[CfdpBase]") { TEST_CASE("CFDP Base", "[CfdpBase]") {
using namespace cfdp; using namespace cfdp;

View File

@ -237,12 +237,12 @@ TEST_CASE("Ring Buffer Test3", "[RingBufferTest3]") {
SECTION("Overflow") { SECTION("Overflow") {
REQUIRE(ringBuffer.availableWriteSpace() == 9); REQUIRE(ringBuffer.availableWriteSpace() == 9);
// Writing more than the buffer is large. // Writing more than the buffer is large.
// This write will be rejected and is seen as a configuration mistake // This write will be rejected and is seen as a configuration mistake
REQUIRE(ringBuffer.writeData(testData, 13) == retval::CATCH_FAILED); REQUIRE(ringBuffer.writeData(testData, 13) == retval::CATCH_FAILED);
REQUIRE(ringBuffer.getAvailableReadData() == 0); REQUIRE(ringBuffer.getAvailableReadData() == 0);
ringBuffer.clear(); ringBuffer.clear();
// Using FreeElement allows the usage of excessBytes but // Using FreeElement allows the usage of excessBytes but
// should be used with caution // should be used with caution
uint8_t *ptr = nullptr; uint8_t *ptr = nullptr;
REQUIRE(ringBuffer.getFreeElement(&ptr, 13) == retval::CATCH_OK); REQUIRE(ringBuffer.getFreeElement(&ptr, 13) == retval::CATCH_OK);

View File

@ -8,8 +8,8 @@
#include <catch2/catch_approx.hpp> #include <catch2/catch_approx.hpp>
#include <catch2/catch_test_macros.hpp> #include <catch2/catch_test_macros.hpp>
#include "LocalPoolOwnerBase.h"
#include "CatchDefinitions.h" #include "CatchDefinitions.h"
#include "LocalPoolOwnerBase.h"
#include "tests/TestsConfig.h" #include "tests/TestsConfig.h"
TEST_CASE("DataSetTest", "[DataSetTest]") { TEST_CASE("DataSetTest", "[DataSetTest]") {

View File

@ -11,8 +11,8 @@
#include <catch2/catch_test_macros.hpp> #include <catch2/catch_test_macros.hpp>
#include <iostream> #include <iostream>
#include "LocalPoolOwnerBase.h"
#include "CatchDefinitions.h" #include "CatchDefinitions.h"
#include "LocalPoolOwnerBase.h"
TEST_CASE("LocalPoolManagerTest", "[LocManTest]") { TEST_CASE("LocalPoolManagerTest", "[LocManTest]") {
LocalPoolOwnerBase* poolOwner = LocalPoolOwnerBase* poolOwner =

View File

@ -3,8 +3,8 @@
#include <catch2/catch_test_macros.hpp> #include <catch2/catch_test_macros.hpp>
#include "LocalPoolOwnerBase.h"
#include "CatchDefinitions.h" #include "CatchDefinitions.h"
#include "LocalPoolOwnerBase.h"
#include "tests/TestsConfig.h" #include "tests/TestsConfig.h"
TEST_CASE("LocalPoolVariable", "[LocPoolVarTest]") { TEST_CASE("LocalPoolVariable", "[LocPoolVarTest]") {

View File

@ -3,8 +3,8 @@
#include <catch2/catch_test_macros.hpp> #include <catch2/catch_test_macros.hpp>
#include "LocalPoolOwnerBase.h"
#include "CatchDefinitions.h" #include "CatchDefinitions.h"
#include "LocalPoolOwnerBase.h"
#include "tests/TestsConfig.h" #include "tests/TestsConfig.h"
TEST_CASE("LocalPoolVector", "[LocPoolVecTest]") { TEST_CASE("LocalPoolVector", "[LocPoolVecTest]") {

View File

@ -2,9 +2,9 @@
#include "ComIFMock.h" #include "ComIFMock.h"
#include "DeviceFdirMock.h" #include "DeviceFdirMock.h"
#include "devicehandler/CookieIFMock.h"
#include "DeviceHandlerCommander.h" #include "DeviceHandlerCommander.h"
#include "DeviceHandlerMock.h" #include "DeviceHandlerMock.h"
#include "devicehandler/CookieIFMock.h"
#include "objects/systemObjectList.h" #include "objects/systemObjectList.h"
TEST_CASE("Device Handler Base", "[DeviceHandlerBase]") { TEST_CASE("Device Handler Base", "[DeviceHandlerBase]") {

View File

@ -1,8 +1,8 @@
#include <array> #include <array>
#include "CatchDefinitions.h"
#include "catch2/catch_test_macros.hpp" #include "catch2/catch_test_macros.hpp"
#include "fsfw/globalfunctions/CRC.h" #include "fsfw/globalfunctions/CRC.h"
#include "CatchDefinitions.h"
TEST_CASE("CRC", "[CRC]") { TEST_CASE("CRC", "[CRC]") {
std::array<uint8_t, 10> testData = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; std::array<uint8_t, 10> testData = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};

View File

@ -1,8 +1,8 @@
#include <array> #include <array>
#include "CatchDefinitions.h"
#include "catch2/catch_test_macros.hpp" #include "catch2/catch_test_macros.hpp"
#include "fsfw/globalfunctions/DleEncoder.h" #include "fsfw/globalfunctions/DleEncoder.h"
#include "CatchDefinitions.h"
const std::vector<uint8_t> TEST_ARRAY_0 = {0, 0, 0, 0, 0}; const std::vector<uint8_t> TEST_ARRAY_0 = {0, 0, 0, 0, 0};
const std::vector<uint8_t> TEST_ARRAY_1 = {0, DleEncoder::DLE_CHAR, 5}; const std::vector<uint8_t> TEST_ARRAY_1 = {0, DleEncoder::DLE_CHAR, 5};

View File

@ -8,11 +8,11 @@
#include <array> #include <array>
#include <catch2/catch_test_macros.hpp> #include <catch2/catch_test_macros.hpp>
#include "CatchDefinitions.h"
#include "fsfw/action/ActionMessage.h" #include "fsfw/action/ActionMessage.h"
#include "fsfw/ipc/CommandMessage.h" #include "fsfw/ipc/CommandMessage.h"
#include "fsfw/ipc/MessageQueueMessage.h" #include "fsfw/ipc/MessageQueueMessage.h"
#include "fsfw/objectmanager/frameworkObjects.h" #include "fsfw/objectmanager/frameworkObjects.h"
#include "CatchDefinitions.h"
#include "mocks/PeriodicTaskIFMock.h" #include "mocks/PeriodicTaskIFMock.h"
TEST_CASE("Internal Error Reporter", "[TestInternalError]") { TEST_CASE("Internal Error Reporter", "[TestInternalError]") {

View File

@ -4,11 +4,11 @@
#include <cstring> #include <cstring>
#include <queue> #include <queue>
#include "CatchDefinitions.h"
#include "fsfw/ipc/CommandMessage.h" #include "fsfw/ipc/CommandMessage.h"
#include "fsfw/ipc/MessageQueueBase.h" #include "fsfw/ipc/MessageQueueBase.h"
#include "fsfw/ipc/MessageQueueIF.h" #include "fsfw/ipc/MessageQueueIF.h"
#include "fsfw/ipc/MessageQueueMessage.h" #include "fsfw/ipc/MessageQueueMessage.h"
#include "CatchDefinitions.h"
class MessageQueueMockBase : public MessageQueueBase { class MessageQueueMockBase : public MessageQueueBase {
public: public:

View File

@ -1,9 +1,9 @@
#include <fsfw/power/DummyPowerSwitcher.h> #include <fsfw/power/DummyPowerSwitcher.h>
#include <fsfw/power/PowerSwitcher.h> #include <fsfw/power/PowerSwitcher.h>
#include "mocks/PowerSwitcherMock.h"
#include <catch2/catch_test_macros.hpp> #include <catch2/catch_test_macros.hpp>
#include "mocks/PowerSwitcherMock.h"
#include "objects/systemObjectList.h" #include "objects/systemObjectList.h"
TEST_CASE("Power Switcher", "[power-switcher]") { TEST_CASE("Power Switcher", "[power-switcher]") {

View File

@ -1,10 +1,9 @@
#include "fsfw/version.h"
#include <catch2/catch_test_macros.hpp> #include <catch2/catch_test_macros.hpp>
#include "fsfw/serviceinterface.h"
#include "CatchDefinitions.h" #include "CatchDefinitions.h"
#include "fsfw/serviceinterface.h"
#include "fsfw/version.h"
TEST_CASE("Version API Tests", "[TestVersionAPI]") { TEST_CASE("Version API Tests", "[TestVersionAPI]") {
// Check that major version is non-zero // Check that major version is non-zero