Builds, unittests failing
Some checks failed
fsfw/fsfw/pipeline/head There was a failure building this commit

This commit is contained in:
Ulrich Mohr 2023-06-01 17:51:55 +02:00
parent e8480cf962
commit 318a933b3b
14 changed files with 25 additions and 19 deletions

View File

@ -72,7 +72,7 @@ set(FSFW_ETL_LIB_MAJOR_VERSION
20 20
CACHE STRING "ETL library major version requirement") CACHE STRING "ETL library major version requirement")
set(FSFW_ETL_LIB_VERSION set(FSFW_ETL_LIB_VERSION
${FSFW_ETL_LIB_MAJOR_VERSION}.35.14 ${FSFW_ETL_LIB_MAJOR_VERSION}.36.0
CACHE STRING "ETL library exact version requirement") CACHE STRING "ETL library exact version requirement")
set(FSFW_ETL_LINK_TARGET etl::etl) set(FSFW_ETL_LINK_TARGET etl::etl)
@ -80,7 +80,7 @@ set(FSFW_CATCH2_LIB_MAJOR_VERSION
3 3
CACHE STRING "Catch2 library major version requirement") CACHE STRING "Catch2 library major version requirement")
set(FSFW_CATCH2_LIB_VERSION set(FSFW_CATCH2_LIB_VERSION
v${FSFW_CATCH2_LIB_MAJOR_VERSION}.1.0 v${FSFW_CATCH2_LIB_MAJOR_VERSION}.3.2
CACHE STRING "Catch2 library exact version requirement") CACHE STRING "Catch2 library exact version requirement")
# Keep this off by default for now. See PR: # Keep this off by default for now. See PR:

View File

@ -1,6 +1,7 @@
#ifndef FSFW_INC_FSFW_ACTION_H_ #ifndef FSFW_INC_FSFW_ACTION_H_
#define FSFW_INC_FSFW_ACTION_H_ #define FSFW_INC_FSFW_ACTION_H_
#include "fsfw/action/Action.h"
#include "fsfw/action/ActionHelper.h" #include "fsfw/action/ActionHelper.h"
#include "fsfw/action/ActionMessage.h" #include "fsfw/action/ActionMessage.h"
#include "fsfw/action/CommandActionHelper.h" #include "fsfw/action/CommandActionHelper.h"

View File

@ -34,12 +34,12 @@ size_t Action::getSerializedSize() const {
ReturnValue_t Action::serialize(uint8_t **buffer, size_t *size, size_t maxSize, ReturnValue_t Action::serialize(uint8_t **buffer, size_t *size, size_t maxSize,
Endianness streamEndianness) const { Endianness streamEndianness) const {
ReturnValue_t result = SerializeAdapter::serialize(&id, buffer, size, maxSize, streamEndianness); ReturnValue_t result = SerializeAdapter::serialize(&id, buffer, size, maxSize, streamEndianness);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != returnvalue::OK) {
return result; return result;
} }
for (auto parameter : *getParameters()) { for (auto parameter : *getParameters()) {
result = parameter->serialize(buffer, size, maxSize, streamEndianness); result = parameter->serialize(buffer, size, maxSize, streamEndianness);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != returnvalue::OK) {
return result; return result;
} }
} }
@ -48,13 +48,13 @@ ReturnValue_t Action::serialize(uint8_t **buffer, size_t *size, size_t maxSize,
ReturnValue_t Action::deSerialize(const uint8_t **buffer, size_t *size, ReturnValue_t Action::deSerialize(const uint8_t **buffer, size_t *size,
Endianness streamEndianness) { Endianness streamEndianness) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;/* TODO not needed as must have been read before to find this action = SerializeAdapter::deSerialize(&id, buffer, size, streamEndianness); ReturnValue_t result = returnvalue::OK;/* TODO not needed as must have been read before to find this action = SerializeAdapter::deSerialize(&id, buffer, size, streamEndianness);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != returnvalue::OK) {
return result; return result;
}*/ }*/
for (auto parameter : *getParameters()) { for (auto parameter : *getParameters()) {
result = parameter->deSerialize(buffer, size, streamEndianness); result = parameter->deSerialize(buffer, size, streamEndianness);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != returnvalue::OK) {
return result; return result;
} }
} }

View File

@ -83,7 +83,7 @@ void ActionHelper::prepareExecution(MessageQueueId_t commandedBy, ActionId_t act
} }
Action* action = actionIter->second; Action* action = actionIter->second;
result = action->deSerialize(&dataPtr, &size, SerializeIF::Endianness::NETWORK); result = action->deSerialize(&dataPtr, &size, SerializeIF::Endianness::NETWORK);
if ((result != HasReturnvaluesIF::RETURN_OK) || (size != 0)){ //TODO write unittest for second condition if ((result != returnvalue::OK) || (size != 0)){ //TODO write unittest for second condition
CommandMessage reply; CommandMessage reply;
ActionMessage::setStepReply(&reply, actionId, 0, HasActionsIF::INVALID_PARAMETERS); ActionMessage::setStepReply(&reply, actionId, 0, HasActionsIF::INVALID_PARAMETERS);
queueToUse->sendMessage(commandedBy, &reply); queueToUse->sendMessage(commandedBy, &reply);

View File

@ -1,6 +1,7 @@
#ifndef FSFW_ACTION_HASACTIONSIF_H_ #ifndef FSFW_ACTION_HASACTIONSIF_H_
#define FSFW_ACTION_HASACTIONSIF_H_ #define FSFW_ACTION_HASACTIONSIF_H_
#include "Action.h"
#include "ActionHelper.h" #include "ActionHelper.h"
#include "ActionMessage.h" #include "ActionMessage.h"
#include "SimpleActionHelper.h" #include "SimpleActionHelper.h"

View File

@ -340,7 +340,7 @@ class DeviceHandlerBase : public DeviceHandlerIF,
*/ */
virtual ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, virtual ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand,
const uint8_t *commandData, const uint8_t *commandData,
size_t commandDataLen) {return HasReturnvaluesIF::RETURN_FAILED;} size_t commandDataLen) {return returnvalue::FAILED;}
/* Reply handling */ /* Reply handling */
/** /**

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <fsfw/returnvalues/HasReturnvaluesIF.h> #include <fsfw/returnvalues/returnvalue.h>
#include <boost/preprocessor.hpp> #include <boost/preprocessor.hpp>
@ -45,4 +45,4 @@
#define FSFW_CLASSLESS_ENUM(name, type, elements) \ #define FSFW_CLASSLESS_ENUM(name, type, elements) \
enum name : type { BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_FOR_EACH(CLEAN_ENUM_ITEM, "", elements)) }; enum name : type { BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_FOR_EACH(CLEAN_ENUM_ITEM, "", elements)) };
#endif #endif

View File

@ -1,6 +1,6 @@
#pragma once #pragma once
#include <fsfw/returnvalues/HasReturnvaluesIF.h> #include <fsfw/returnvalues/returnvalue.h>
#include <fsfw/serialize/SerializeAdapter.h> #include <fsfw/serialize/SerializeAdapter.h>
#include <boost/preprocessor.hpp> #include <boost/preprocessor.hpp>
@ -61,4 +61,4 @@
}; };
#endif #endif

View File

@ -127,7 +127,7 @@ std::vector<std::pair<Submode_t, const char *>> ModeHelper::getSubmodes(Mode_t m
for (size_t i = 0; i < submode->getSize(); i++) { for (size_t i = 0; i < submode->getSize(); i++) {
uint32_t ignored; uint32_t ignored;
if (owner->checkModeCommand(mode, submode->getElements()[i], &ignored) == if (owner->checkModeCommand(mode, submode->getElements()[i], &ignored) ==
HasReturnvaluesIF::RETURN_OK) { returnvalue::OK) {
submodeVector.push_back(std::pair<Submode_t, const char *>(submode->getElements()[i], submodeVector.push_back(std::pair<Submode_t, const char *>(submode->getElements()[i],
submode->getDescriptions()[i])); submode->getDescriptions()[i]));
} }

View File

@ -104,6 +104,10 @@ void ObjectManager::produce() {
return; return;
} }
objectFactoryFunction(factoryArgs); objectFactoryFunction(factoryArgs);
}
void ObjectManager::initialize() {
produce();
ReturnValue_t result = returnvalue::FAILED; ReturnValue_t result = returnvalue::FAILED;
uint32_t errorCount = 0; uint32_t errorCount = 0;
for (auto const& it : objectList) { for (auto const& it : objectList) {

View File

@ -4,7 +4,7 @@
ReturnValue_t CcsdsTimestampReader::readTimeStamp(const uint8_t* buffer, uint8_t maxSize) { ReturnValue_t CcsdsTimestampReader::readTimeStamp(const uint8_t* buffer, uint8_t maxSize) {
ReturnValue_t result = CCSDSTime::convertFromCcsds(&time, buffer, &timestampLen, maxSize); ReturnValue_t result = CCSDSTime::convertFromCcsds(&time, buffer, &timestampLen, maxSize);
if (result != HasReturnvaluesIF::RETURN_OK) { if (result != returnvalue::OK) {
return result; return result;
} }
return result; return result;

View File

@ -76,7 +76,7 @@ class SpacePacketCreator : public SpacePacketIF, public SerializeIF {
SpacePacketParams params{}; SpacePacketParams params{};
/** /**
* Forbidden to call and always return HasReturnvaluesIF::RETURN_FAILED * Forbidden to call and always return returnvalue::FAILED
* @param buffer * @param buffer
* @param size * @param size
* @param streamEndianness * @param streamEndianness

View File

@ -37,7 +37,7 @@ class PusTmReader : public PusTmIF,
/** /**
* Performs a CRC check on the data as well * Performs a CRC check on the data as well
* @return * @return
* - HasReturnvaluesIF::RETURN_OK: Successfully parsed the packet * - returnvalue::OK: Successfully parsed the packet
* - SerializeIF::STREAM_TOO_SHORT: Stream too short for detected packet size * - SerializeIF::STREAM_TOO_SHORT: Stream too short for detected packet size
* - PusIF::INVALID_CRC_16 on invalid CRC * - PusIF::INVALID_CRC_16 on invalid CRC
*/ */

View File

@ -10,7 +10,7 @@
TEST_CASE("Action Helper", "[ActionHelper]") { TEST_CASE("Action Helper", "[ActionHelper]") {
MessageQueueMockBase testMqMock; MessageQueueMock testMqMock(1);
ActionHelperOwnerMockBase testDhMock(&testMqMock); ActionHelperOwnerMockBase testDhMock(&testMqMock);
CommandMessage actionMessage; CommandMessage actionMessage;
ActionId_t testActionId = (ActionId_t) TestActions::TEST_ACTION; ActionId_t testActionId = (ActionId_t) TestActions::TEST_ACTION;
@ -24,7 +24,7 @@ TEST_CASE("Action Helper", "[ActionHelper]") {
SECTION("Simple tests") { SECTION("Simple tests") {
ActionMessage::setCommand(&actionMessage, testActionId, paramAddress); ActionMessage::setCommand(&actionMessage, testActionId, paramAddress);
CHECK(not testDhMock.executeActionCalled); CHECK(not testDhMock.executeActionCalled);
REQUIRE(testDhMock.getActionHelper()->handleActionMessage(&actionMessage) == retval::CATCH_OK); REQUIRE(testDhMock.getActionHelper()->handleActionMessage(&actionMessage) == returnvalue::OK);
CHECK(testDhMock.executeActionCalled); CHECK(testDhMock.executeActionCalled);
// No message is sent if everything is alright. // No message is sent if everything is alright.
CHECK(not testMqMock.wasMessageSent()); CHECK(not testMqMock.wasMessageSent());