mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 16:29:04 -06:00
lestarch: fixing leakcheck/valgrind collision and associated errors
This commit is contained in:
parent
a1d2b14151
commit
d39c89e653
@ -8,6 +8,9 @@ project(FPrime C CXX)
|
||||
set(FPRIME_FRAMEWORK_PATH "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Location of F prime framework" FORCE)
|
||||
set(FPRIME_PROJECT_ROOT "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Root path of F prime project" FORCE)
|
||||
|
||||
# Include the build for F prime.
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/cmake/FPrime.cmake")
|
||||
|
||||
# This cmake project is only intended to be used by CI and developers to test F-prime. We enable
|
||||
# -Wall and -Wextra on this particular project as a canary to warn about compilation
|
||||
# errors without impacting real projects, where a warning from an untested compiler could break the
|
||||
@ -45,13 +48,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-Wno-zero-length-array>
|
||||
)
|
||||
endif()
|
||||
|
||||
find_program(VALGRIND valgrind) # Find valgrind, and use it instead of leak check
|
||||
# For this testing cmake project, enable AddressSanitizer, a runtime memory sanitizer, on all unit tests
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Testing" OR CMAKE_BUILD_TYPE STREQUAL "TESTING")
|
||||
add_compile_options(-fno-omit-frame-pointer -fsanitize=address)
|
||||
add_link_options(-fno-omit-frame-pointer -fsanitize=address)
|
||||
if (BUILD_TESTING AND NOT VALGRIND)
|
||||
add_compile_options(-fno-omit-frame-pointer -fsanitize=address -fsanitize=leak -fsanitize=undefined -static-libasan)
|
||||
add_link_options(-fno-omit-frame-pointer -fsanitize=address -fsanitize=leak -fsanitize=undefined -static-libasan)
|
||||
endif()
|
||||
|
||||
# Include the build for F prime.
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/cmake/FPrime.cmake")
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/cmake/FPrime-Code.cmake")
|
||||
|
||||
@ -87,7 +87,7 @@ namespace Os {
|
||||
class QueueRegistry {
|
||||
public:
|
||||
virtual void regQueue(Queue* obj)=0; //!< method called by queue init() methods to register a new queue
|
||||
virtual ~QueueRegistry(); //!< virtual destructor for registry object
|
||||
virtual ~QueueRegistry() {}; //!< virtual destructor for registry object
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -17,7 +17,11 @@ namespace Os {
|
||||
SimpleQueueRegistry::~SimpleQueueRegistry() {
|
||||
}
|
||||
|
||||
void SimpleQueueRegistry::regQueue(Queue* obj) {
|
||||
}
|
||||
|
||||
void SimpleQueueRegistry::dump() {
|
||||
}
|
||||
|
||||
} /* namespace Os */
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ namespace Svc {
|
||||
- sizeof(AMPCSSequence::Record::TimeFlag::Serial::t)
|
||||
- sizeof(AMPCSSequence::Record::Time::t)
|
||||
- sizeof(AMPCSSequence::Record::CmdLength::t);
|
||||
U8 cmdFieldBuffer[cmdFieldSize];
|
||||
U8 cmdFieldBuffer[cmdFieldSize] = {0};
|
||||
Fw::SerialBuffer cmdField(cmdFieldBuffer, sizeof(cmdFieldBuffer));
|
||||
cmdField.setBuffLen(cmdFieldSize);
|
||||
AMPCS::Records::serialize(timeFlag, time, cmdField, buffer);
|
||||
|
||||
@ -93,6 +93,6 @@ function(add_module_target MODULE_NAME TARGET_NAME SOURCE_FILES DEPENDENCIES)
|
||||
--verbose -T MemCheck
|
||||
)
|
||||
endif()
|
||||
add_dependencies("${MODULE_NAME}_${TARGET}" ${UT_EXE_NAME})
|
||||
add_dependencies("${TARGET}" ${UT_EXE_NAME})
|
||||
add_dependencies("${MODULE_NAME}_${TARGET_NAME}" ${UT_EXE_NAME})
|
||||
add_dependencies("${TARGET_NAME}" ${UT_EXE_NAME})
|
||||
endfunction(add_module_target)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user