diff --git a/src/fsfw/filesystem/HasFileSystemIF.h b/src/fsfw/filesystem/HasFileSystemIF.h index 941a14029..8eef6f22d 100644 --- a/src/fsfw/filesystem/HasFileSystemIF.h +++ b/src/fsfw/filesystem/HasFileSystemIF.h @@ -1,8 +1,8 @@ #ifndef FSFW_MEMORY_HASFILESYSTEMIF_H_ #define FSFW_MEMORY_HASFILESYSTEMIF_H_ -#include #include +#include #include "FileSystemArgsIF.h" #include "fsfw/ipc/MessageQueueIF.h" diff --git a/src/fsfw/globalfunctions/Type.h b/src/fsfw/globalfunctions/Type.h index f55c4412a..4aafb3003 100644 --- a/src/fsfw/globalfunctions/Type.h +++ b/src/fsfw/globalfunctions/Type.h @@ -58,7 +58,7 @@ class Type : public SerializeIF { template struct PodTypeConversion { - static_assert(! std::is_same::value, + static_assert(!std::is_same::value, "Do not use boolean for the PoolEntry type, use uint8_t " "instead! The ECSS standard defines a boolean as a one bit " "field. Therefore it is preferred to store a boolean as an " diff --git a/src/fsfw/globalfunctions/arrayprinter.cpp b/src/fsfw/globalfunctions/arrayprinter.cpp index e64b48926..df1fe0b73 100644 --- a/src/fsfw/globalfunctions/arrayprinter.cpp +++ b/src/fsfw/globalfunctions/arrayprinter.cpp @@ -84,9 +84,9 @@ void arrayprinter::printDec(const uint8_t *data, size_t size, size_t maxCharPerL #else // General format: 32,243,-12 so it is number of chars times 4 // plus line break plus small safety margin. - + for (size_t i = 0; i < size; i++) { - //TODO + // TODO } #endif } diff --git a/src/fsfw/osal/Endiness.h b/src/fsfw/osal/Endiness.h index cf68597a4..29118c3fc 100644 --- a/src/fsfw/osal/Endiness.h +++ b/src/fsfw/osal/Endiness.h @@ -24,8 +24,8 @@ #else #ifdef WIN32 -#include #include +#include #if REG_DWORD == REG_DWORD_LITTLE_ENDIAN #define BYTE_ORDER_SYSTEM LITTLE_ENDIAN #else diff --git a/src/fsfw/osal/freertos/Clock.cpp b/src/fsfw/osal/freertos/Clock.cpp index ec7ac999a..5b0f8ec1c 100644 --- a/src/fsfw/osal/freertos/Clock.cpp +++ b/src/fsfw/osal/freertos/Clock.cpp @@ -40,6 +40,3 @@ timeval Clock::getUptime() { // timeval uptime = getUptime(); // return uptime.tv_sec; // } - - - diff --git a/src/fsfw/osal/host/Clock.cpp b/src/fsfw/osal/host/Clock.cpp index c1f017c48..5e1620c38 100644 --- a/src/fsfw/osal/host/Clock.cpp +++ b/src/fsfw/osal/host/Clock.cpp @@ -78,4 +78,3 @@ timeval Clock::getUptime() { #endif return timeval; } - diff --git a/src/fsfw/osal/host/PeriodicTask.cpp b/src/fsfw/osal/host/PeriodicTask.cpp index 9137b4438..dc27f98f2 100644 --- a/src/fsfw/osal/host/PeriodicTask.cpp +++ b/src/fsfw/osal/host/PeriodicTask.cpp @@ -10,7 +10,6 @@ #if defined(PLATFORM_WIN) - #include "fsfw/osal/windows/winTaskHelpers.h" #elif defined(PLATFORM_UNIX) #include diff --git a/src/fsfw/osal/host/taskHelpers.h b/src/fsfw/osal/host/taskHelpers.h index 359883322..ed61b6d7c 100644 --- a/src/fsfw/osal/host/taskHelpers.h +++ b/src/fsfw/osal/host/taskHelpers.h @@ -3,8 +3,8 @@ #include -#include #include +#include namespace tasks { diff --git a/src/fsfw/osal/linux/Clock.cpp b/src/fsfw/osal/linux/Clock.cpp index c860e5df2..03fc2b182 100644 --- a/src/fsfw/osal/linux/Clock.cpp +++ b/src/fsfw/osal/linux/Clock.cpp @@ -34,7 +34,7 @@ ReturnValue_t Clock::getClock_timeval(timeval* time) { } timeval Clock::getUptime() { - timeval uptime{0,0}; + timeval uptime{0, 0}; double uptimeSeconds; if (std::ifstream("/proc/uptime", std::ios::in) >> uptimeSeconds) { uptime.tv_sec = uptimeSeconds; diff --git a/src/fsfw/osal/rtems/BinarySemaphore.cpp b/src/fsfw/osal/rtems/BinarySemaphore.cpp index 200c3095c..b945aab70 100644 --- a/src/fsfw/osal/rtems/BinarySemaphore.cpp +++ b/src/fsfw/osal/rtems/BinarySemaphore.cpp @@ -2,7 +2,7 @@ #include -//TODO +// TODO BinarySemaphore::BinarySemaphore() {} diff --git a/src/fsfw/osal/rtems/Clock.cpp b/src/fsfw/osal/rtems/Clock.cpp index 2cf903c84..ecfcc78c8 100644 --- a/src/fsfw/osal/rtems/Clock.cpp +++ b/src/fsfw/osal/rtems/Clock.cpp @@ -6,7 +6,6 @@ #include "fsfw/ipc/MutexGuard.h" #include "fsfw/osal/rtems/RtemsBasic.h" - ReturnValue_t Clock::setClock(const timeval* time) { TimeOfDay_t time_tod; ReturnValue_t result = convertTimevalToTimeOfDay(time, &time_tod); @@ -20,7 +19,8 @@ ReturnValue_t Clock::setClock(const timeval* time) { timeRtems.hour = time_tod.hour; timeRtems.minute = time_tod.minute; timeRtems.second = time_tod.second; - timeRtems.ticks = static_cast(time_tod.usecond) * rtems_clock_get_ticks_per_second() / 1e6; + timeRtems.ticks = + static_cast(time_tod.usecond) * rtems_clock_get_ticks_per_second() / 1e6; rtems_status_code status = rtems_clock_set(&timeRtems); switch (status) { case RTEMS_SUCCESSFUL: diff --git a/src/fsfw/osal/rtems/InternalErrorCodes.cpp b/src/fsfw/osal/rtems/InternalErrorCodes.cpp index 659840f9c..6dd90efb0 100644 --- a/src/fsfw/osal/rtems/InternalErrorCodes.cpp +++ b/src/fsfw/osal/rtems/InternalErrorCodes.cpp @@ -35,19 +35,19 @@ ReturnValue_t InternalErrorCodes::translate(uint8_t code) { return OUT_OF_PROXIES; case INTERNAL_ERROR_INVALID_GLOBAL_ID: return INVALID_GLOBAL_ID; - //TODO this one is not there anymore in rtems-6 (5 as well?) - //case INTERNAL_ERROR_BAD_STACK_HOOK: - // return BAD_STACK_HOOK; - // case INTERNAL_ERROR_BAD_ATTRIBUTES: - // return BAD_ATTRIBUTES; - // case INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY: - // return IMPLEMENTATION_KEY_CREATE_INCONSISTENCY; - // case INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL: - // return IMPLEMENTATION_BLOCKING_OPERATION_CANCEL; - // case INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE: - // return MUTEX_OBTAIN_FROM_BAD_STATE; - // case INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0: - // return UNLIMITED_AND_MAXIMUM_IS_0; + // TODO this one is not there anymore in rtems-6 (5 as well?) + // case INTERNAL_ERROR_BAD_STACK_HOOK: + // return BAD_STACK_HOOK; + // case INTERNAL_ERROR_BAD_ATTRIBUTES: + // return BAD_ATTRIBUTES; + // case INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY: + // return IMPLEMENTATION_KEY_CREATE_INCONSISTENCY; + // case INTERNAL_ERROR_IMPLEMENTATION_BLOCKING_OPERATION_CANCEL: + // return IMPLEMENTATION_BLOCKING_OPERATION_CANCEL; + // case INTERNAL_ERROR_MUTEX_OBTAIN_FROM_BAD_STATE: + // return MUTEX_OBTAIN_FROM_BAD_STATE; + // case INTERNAL_ERROR_UNLIMITED_AND_MAXIMUM_IS_0: + // return UNLIMITED_AND_MAXIMUM_IS_0; default: return returnvalue::FAILED; } diff --git a/src/fsfw/osal/rtems/SemaphoreFactory.cpp b/src/fsfw/osal/rtems/SemaphoreFactory.cpp index 8bc2a9117..06623d1ed 100644 --- a/src/fsfw/osal/rtems/SemaphoreFactory.cpp +++ b/src/fsfw/osal/rtems/SemaphoreFactory.cpp @@ -1,5 +1,5 @@ #include "fsfw/osal/rtems/BinarySemaphore.h" -//#include "fsfw/osal/rtems/CountingSemaphore.h" +// #include "fsfw/osal/rtems/CountingSemaphore.h" #include "fsfw/serviceinterface/ServiceInterface.h" #include "fsfw/tasks/SemaphoreFactory.h" @@ -19,8 +19,8 @@ SemaphoreFactory* SemaphoreFactory::instance() { SemaphoreIF* SemaphoreFactory::createBinarySemaphore(uint32_t argument) { return nullptr; - //TODO - //return new BinarySemaphore(); + // TODO + // return new BinarySemaphore(); } SemaphoreIF* SemaphoreFactory::createCountingSemaphore(uint8_t maxCount, uint8_t initCount, diff --git a/src/fsfw/osal/windows/winTaskHelpers.h b/src/fsfw/osal/windows/winTaskHelpers.h index f5485cc88..892f3c419 100644 --- a/src/fsfw/osal/windows/winTaskHelpers.h +++ b/src/fsfw/osal/windows/winTaskHelpers.h @@ -5,8 +5,8 @@ #ifdef _WIN32 -#include #include +#include namespace tasks { diff --git a/src/fsfw/rmap/rmapStructs.h b/src/fsfw/rmap/rmapStructs.h index 55e32606f..1e86734b1 100644 --- a/src/fsfw/rmap/rmapStructs.h +++ b/src/fsfw/rmap/rmapStructs.h @@ -10,11 +10,11 @@ ////////////////////////////////////////////////////////////////////////////////// // RMAP command bits -//#define RMAP_COMMAND_BIT_INCREMENT 2 -//#define RMAP_COMMAND_BIT_REPLY 3 -//#define RMAP_COMMAND_BIT_WRITE 5 -//#define RMAP_COMMAND_BIT_VERIFY 4 -//#define RMAP_COMMAND_BIT 6 +// #define RMAP_COMMAND_BIT_INCREMENT 2 +// #define RMAP_COMMAND_BIT_REPLY 3 +// #define RMAP_COMMAND_BIT_WRITE 5 +// #define RMAP_COMMAND_BIT_VERIFY 4 +// #define RMAP_COMMAND_BIT 6 namespace RMAPIds { @@ -32,14 +32,14 @@ static const uint8_t RMAP_COMMAND_READ = ((1 << RMAP_COMMAND_BIT) | (1 << RMAP_C static const uint8_t RMAP_REPLY_WRITE = ((1 << RMAP_COMMAND_BIT_WRITE) | (1 << RMAP_COMMAND_BIT_REPLY)); static const uint8_t RMAP_REPLY_READ = ((1 << RMAP_COMMAND_BIT_REPLY)); -//#define RMAP_COMMAND_WRITE ((1< #endif - class Clock { public: - // https://xkcd.com/927/ + // https://xkcd.com/927/ typedef struct { uint32_t year; //!< Year, A.D. uint32_t month; //!< Month, 1 .. 12. diff --git a/src/fsfw/timemanager/ClockCommon.cpp b/src/fsfw/timemanager/ClockCommon.cpp index d5f9c2f83..ec09d0714 100644 --- a/src/fsfw/timemanager/ClockCommon.cpp +++ b/src/fsfw/timemanager/ClockCommon.cpp @@ -1,5 +1,5 @@ -#include #include +#include #include "fsfw/ipc/MutexGuard.h" #include "fsfw/timemanager/Clock.h" @@ -110,7 +110,7 @@ ReturnValue_t Clock::convertTimeOfDayToTimeval(const TimeOfDay_t* from, timeval* to->tv_sec = seconds; to->tv_usec = from->usecond; - if (seconds == (time_t) -1) { + if (seconds == (time_t)-1) { return returnvalue::FAILED; } diff --git a/src/fsfw/timemanager/Countdown.cpp b/src/fsfw/timemanager/Countdown.cpp index 9f0152a9e..4709a0b5f 100644 --- a/src/fsfw/timemanager/Countdown.cpp +++ b/src/fsfw/timemanager/Countdown.cpp @@ -38,6 +38,4 @@ uint32_t Countdown::getRemainingMillis() const { } } -uint32_t Countdown::getCurrentTime() const { - return Clock::getUptime_ms(); -} +uint32_t Countdown::getCurrentTime() const { return Clock::getUptime_ms(); } diff --git a/src/fsfw/timemanager/TimeReaderIF.h b/src/fsfw/timemanager/TimeReaderIF.h index 9830f129e..9273779d0 100644 --- a/src/fsfw/timemanager/TimeReaderIF.h +++ b/src/fsfw/timemanager/TimeReaderIF.h @@ -1,17 +1,17 @@ #ifndef FSFW_TIMEMANAGER_TIMEREADERIF_H #define FSFW_TIMEMANAGER_TIMEREADERIF_H -#include -#include #include +#include +#include #include "fsfw/platform.h" #ifdef PLATFORM_WIN // wtf? Required for timeval! -#include #include +#include #endif #include "TimeStampIF.h" diff --git a/src/fsfw_hal/host/HostFilesystem.h b/src/fsfw_hal/host/HostFilesystem.h index 044f6b7cf..2fa38b14d 100644 --- a/src/fsfw_hal/host/HostFilesystem.h +++ b/src/fsfw_hal/host/HostFilesystem.h @@ -15,7 +15,8 @@ class HostFilesystem : public HasFileSystemIF { ReturnValue_t readFromFile(FileOpParams fileOpInfo, uint8_t **buffer, size_t &readSize, size_t maxSize) override; ReturnValue_t createFile(FilesystemParams params, const uint8_t *data, size_t size) override; - ReturnValue_t removeFile(const std::filesystem::path::value_type *path, FileSystemArgsIF *args) override; + ReturnValue_t removeFile(const std::filesystem::path::value_type *path, + FileSystemArgsIF *args) override; ReturnValue_t createDirectory(FilesystemParams params, bool createParentDirs) override; ReturnValue_t removeDirectory(FilesystemParams params, bool deleteRecurively) override; ReturnValue_t rename(const std::filesystem::path::value_type *oldPath, diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt index e02e76494..3fcdbd9e1 100644 --- a/unittests/CMakeLists.txt +++ b/unittests/CMakeLists.txt @@ -20,9 +20,9 @@ add_subdirectory(globalfunctions) add_subdirectory(timemanager) add_subdirectory(tmtcpacket) add_subdirectory(cfdp) -IF(NOT FSFW_OSAL MATCHES "rtems") -add_subdirectory(hal) -ENDIF() +if(NOT FSFW_OSAL MATCHES "rtems") + add_subdirectory(hal) +endif() add_subdirectory(internalerror) add_subdirectory(devicehandler) add_subdirectory(tmtcservices) diff --git a/unittests/CatchRunner.cpp b/unittests/CatchRunner.cpp index a909bd9db..eecd393d4 100644 --- a/unittests/CatchRunner.cpp +++ b/unittests/CatchRunner.cpp @@ -51,31 +51,29 @@ extern "C" { void exit_qemu_failing(int error) { asm(/* 0x20026 == ADP_Stopped_ApplicationExit */ - "mov x1, #0x26\n\t" - "movk x1, #2, lsl #16\n\t" - "str x1, [sp,#0]\n\t"); + "mov x1, #0x26\n\t" + "movk x1, #2, lsl #16\n\t" + "str x1, [sp,#0]\n\t"); - /* Exit status code. Host QEMU process exits with that status. */ - asm("mov x0, %[error]\n\t" : : [error] "r" (error)); - asm( - "str x0, [sp,#8]\n\t" + /* Exit status code. Host QEMU process exits with that status. */ + asm("mov x0, %[error]\n\t" : : [error] "r"(error)); + asm("str x0, [sp,#8]\n\t" - /* x1 contains the address of parameter block. - * Any memory address could be used. */ - "mov x1, sp\n\t" + /* x1 contains the address of parameter block. + * Any memory address could be used. */ + "mov x1, sp\n\t" - /* SYS_EXIT */ - "mov w0, #0x18\n\t" + /* SYS_EXIT */ + "mov w0, #0x18\n\t" - /* Do the semihosting call on A64. */ - "hlt 0xf000\n\t" -); + /* Do the semihosting call on A64. */ + "hlt 0xf000\n\t"); } #include -void user_handle_fatal(Internal_errors_Source source, bool internal, Internal_errors_t error_code){ - if ( source == RTEMS_FATAL_SOURCE_EXIT ) { +void user_handle_fatal(Internal_errors_Source source, bool internal, Internal_errors_t error_code) { + if (source == RTEMS_FATAL_SOURCE_EXIT) { if (error_code != 0) { printk("*** EXIT STATUS NOT ZERO ***\n"); printk("Quitting qemu with exit code %i\n", error_code); diff --git a/unittests/datapoollocal/testDataSet.cpp b/unittests/datapoollocal/testDataSet.cpp index df6e0dc2b..4bb69a64c 100644 --- a/unittests/datapoollocal/testDataSet.cpp +++ b/unittests/datapoollocal/testDataSet.cpp @@ -30,7 +30,7 @@ TEST_CASE("DataSetTest", "[DataSetTest]") { CHECK(localSet.getSid() == lpool::testSid); CHECK(localSet.getCreatorObjectId() == objects::TEST_LOCAL_POOL_OWNER_BASE); size_t maxSize = localSet.getLocalPoolIdsSerializedSize(true); - uint8_t localPoolIdBuff[ 3 * sizeof(lp_id_t) + sizeof(uint8_t)]; + uint8_t localPoolIdBuff[3 * sizeof(lp_id_t) + sizeof(uint8_t)]; /* Skip size field */ auto* lpIds = reinterpret_cast(localPoolIdBuff + 1); size_t serSize = 0; @@ -108,7 +108,7 @@ TEST_CASE("DataSetTest", "[DataSetTest]") { CHECK(maxSize == sizeof(uint8_t) + sizeof(float) + sizeof(uint16_t) * 3); serSize = 0; /* Already reserve additional space for validity buffer, will be needed later */ - std::vector buffer(maxSize+1); + std::vector buffer(maxSize + 1); uint8_t* buffPtr = buffer.data(); CHECK(localSet.serialize(&buffPtr, &serSize, maxSize, SerializeIF::Endianness::MACHINE) == returnvalue::OK); @@ -157,8 +157,8 @@ TEST_CASE("DataSetTest", "[DataSetTest]") { CHECK(maxSize == sizeof(uint8_t) + sizeof(uint16_t) * 3 + sizeof(float) + 1); serSize = 0; buffPtr = buffer.data(); - CHECK(localSet.serialize(&buffPtr, &serSize, buffer.size(), SerializeIF::Endianness::MACHINE) == - returnvalue::OK); + CHECK(localSet.serialize(&buffPtr, &serSize, buffer.size(), + SerializeIF::Endianness::MACHINE) == returnvalue::OK); CHECK(rawUint8 == 232); std::memcpy(&rawFloat, buffer.data() + sizeof(uint8_t), sizeof(float)); CHECK(rawFloat == Catch::Approx(-2324.322)); @@ -203,12 +203,12 @@ TEST_CASE("DataSetTest", "[DataSetTest]") { } /* Common fault test cases */ - //LocalPoolObjectBase* variableHandle = poolOwner.getPoolObjectHandle(lpool::uint32VarId); - //CHECK(variableHandle != nullptr); - //CHECK(localSet.registerVariable(variableHandle) == static_cast(DataSetIF::DATA_SET_FULL)); - //variableHandle = nullptr; - //REQUIRE(localSet.registerVariable(variableHandle) == - // static_cast(DataSetIF::POOL_VAR_NULL)); + // LocalPoolObjectBase* variableHandle = poolOwner.getPoolObjectHandle(lpool::uint32VarId); + // CHECK(variableHandle != nullptr); + // CHECK(localSet.registerVariable(variableHandle) == + // static_cast(DataSetIF::DATA_SET_FULL)); variableHandle = nullptr; + // REQUIRE(localSet.registerVariable(variableHandle) == + // static_cast(DataSetIF::POOL_VAR_NULL)); } SECTION("MorePoolVariables") { diff --git a/unittests/datapoollocal/testLocalPoolManager.cpp b/unittests/datapoollocal/testLocalPoolManager.cpp index 0de1f201d..1949ff84d 100644 --- a/unittests/datapoollocal/testLocalPoolManager.cpp +++ b/unittests/datapoollocal/testLocalPoolManager.cpp @@ -419,7 +419,7 @@ TEST_CASE("Local Pool Manager Tests", "[LocManTest]") { CHECK(poolOwner.changedVariableCallbackWasCalled(gpidToCheck, storeId) == true); CHECK(gpidToCheck == lpool::uint8VarGpid); - //poolOwner.poolManager.printPoolEntry(lpool::uint8VarId); + // poolOwner.poolManager.printPoolEntry(lpool::uint8VarId); } /* we need to reset the subscription list because the pool owner diff --git a/unittests/hal/testHostFilesystem.cpp b/unittests/hal/testHostFilesystem.cpp index 19d1631fd..96d810764 100644 --- a/unittests/hal/testHostFilesystem.cpp +++ b/unittests/hal/testHostFilesystem.cpp @@ -1,10 +1,10 @@ #include +#include #include #include #include #include -#include #include "fsfw/serialize/SerializeIF.h" #include "fsfw_hal/host/HostFilesystem.h" diff --git a/unittests/mocks/FilesystemMock.cpp b/unittests/mocks/FilesystemMock.cpp index c6be79fb7..c2f63e14b 100644 --- a/unittests/mocks/FilesystemMock.cpp +++ b/unittests/mocks/FilesystemMock.cpp @@ -5,9 +5,9 @@ #include "fsfw/serialize/SerializeIF.h" ReturnValue_t FilesystemMock::feedFile(const std::string &filename, std::ifstream &file) { - - //not multibyte encoding safe! - std::basic_string native_filename(filename.begin(), filename.end()); + // not multibyte encoding safe! + std::basic_string native_filename(filename.begin(), + filename.end()); if (not std::filesystem::exists(native_filename)) { return returnvalue::FAILED; diff --git a/unittests/mocks/FilesystemMock.h b/unittests/mocks/FilesystemMock.h index 7b1da6820..b603d7dc5 100644 --- a/unittests/mocks/FilesystemMock.h +++ b/unittests/mocks/FilesystemMock.h @@ -20,8 +20,9 @@ class FilesystemMock : public HasFileSystemIF { public: struct FileWriteInfo { - FileWriteInfo(std::basic_string filename, size_t offset, const uint8_t *data, size_t len) - : offset(offset) { + FileWriteInfo(std::basic_string filename, size_t offset, + const uint8_t *data, size_t len) + : offset(offset) { this->filename = filename; this->data.insert(this->data.end(), data, data + len); } @@ -47,8 +48,8 @@ class FilesystemMock : public HasFileSystemIF { std::map, DirInfo> dirMap; struct RenameInfo { - RenameInfo(std::basic_string < std::filesystem::path::value_type> oldName, - std::basic_string < std::filesystem::path::value_type> newName) + RenameInfo(std::basic_string oldName, + std::basic_string newName) : oldName(std::move(oldName)), newName(std::move(newName)) {} std::basic_string oldName; @@ -56,8 +57,7 @@ class FilesystemMock : public HasFileSystemIF { }; std::queue renameQueue; std::basic_string truncateCalledOnFile; - ReturnValue_t feedFile(const std::string &filename, - std::ifstream &file); + ReturnValue_t feedFile(const std::string &filename, std::ifstream &file); bool fileExists(FilesystemParams params) override; ReturnValue_t truncateFile(FilesystemParams params) override; diff --git a/unittests/osal/CMakeLists.txt b/unittests/osal/CMakeLists.txt index b021bacb6..063e0f648 100644 --- a/unittests/osal/CMakeLists.txt +++ b/unittests/osal/CMakeLists.txt @@ -1,5 +1,5 @@ target_sources(${FSFW_TEST_TGT} PRIVATE testMq.cpp TestClock.cpp) if(FSFW_OSAL MATCHES "linux" OR FSFW_OSAL MATCHES "freertos") -target_sources(${FSFW_TEST_TGT} PRIVATE TestSemaphore.cpp) + target_sources(${FSFW_TEST_TGT} PRIVATE TestSemaphore.cpp) endif() diff --git a/unittests/osal/TestClock.cpp b/unittests/osal/TestClock.cpp index b6d7261c6..ffa2fb3c5 100644 --- a/unittests/osal/TestClock.cpp +++ b/unittests/osal/TestClock.cpp @@ -8,7 +8,7 @@ #include "CatchDefinitions.h" -//TODO setClock() +// TODO setClock() TEST_CASE("OSAL::Clock Test", "[OSAL::Clock Test]") { SECTION("Test getClock") { diff --git a/unittests/osal/TestSemaphore.cpp b/unittests/osal/TestSemaphore.cpp index ab47cdab4..e60a5dae8 100644 --- a/unittests/osal/TestSemaphore.cpp +++ b/unittests/osal/TestSemaphore.cpp @@ -4,7 +4,6 @@ #include - TEST_CASE("Binary Semaphore Test", "[BinSemaphore]") { // perform set-up here SemaphoreIF* binSemaph = SemaphoreFactory::instance()->createBinarySemaphore(); diff --git a/unittests/testcfg/freertos/FreeRTOSConfig.h b/unittests/testcfg/freertos/FreeRTOSConfig.h index 049bbc25e..8e5e3d559 100644 --- a/unittests/testcfg/freertos/FreeRTOSConfig.h +++ b/unittests/testcfg/freertos/FreeRTOSConfig.h @@ -63,7 +63,7 @@ #define configMAX_API_CALL_INTERRUPT_PRIORITY [dependent on processor and application] /* Define to trap errors during development. */ -//#define configASSERT( ( x ) ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ ) +// #define configASSERT( ( x ) ) if( ( x ) == 0 ) vAssertCalled( __FILE__, __LINE__ ) /* FreeRTOS MPU specific definitions. */ #define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0 diff --git a/unittests/testcfg/rtems/include/rtemsConfig.h b/unittests/testcfg/rtems/include/rtemsConfig.h index 5988258e5..69aa16493 100644 --- a/unittests/testcfg/rtems/include/rtemsConfig.h +++ b/unittests/testcfg/rtems/include/rtemsConfig.h @@ -1,9 +1,8 @@ #pragma once - -#include #include -void user_handle_fatal(Internal_errors_Source source, bool internal, Internal_errors_t error_code); +#include +void user_handle_fatal(Internal_errors_Source source, bool internal, Internal_errors_t error_code); #define RTEMS_USE_UNLIMITED_OBJECTS_ALLOCATION 0 @@ -24,7 +23,8 @@ void user_handle_fatal(Internal_errors_Source source, bool internal, Internal_e //! Around 41 kB extra task stack for now. #define CONFIGURE_EXTRA_TASK_STACKS (10 * RTEMS_MINIMUM_STACK_SIZE) -#define CONFIGURE_INITIAL_EXTENSIONS { NULL, NULL, NULL, NULL, NULL, NULL, NULL, user_handle_fatal, NULL } +#define CONFIGURE_INITIAL_EXTENSIONS \ + { NULL, NULL, NULL, NULL, NULL, NULL, NULL, user_handle_fatal, NULL } #define CONFIGURE_INIT