Skip to content

Commit

Permalink
Require Os/Task implementation and add Fw/Time link dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-bc committed Aug 2, 2024
1 parent 55ec7d4 commit 7a27ec9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Os/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ endif()
register_fprime_module()

require_fprime_implementation(Os/File)
# require_fprime_implementation(Os/Task) # should be added in
require_fprime_implementation(Os/Task)
require_fprime_implementation(Os/Mutex)


Expand All @@ -113,7 +113,7 @@ set(UT_SOURCE_FILES
)
register_fprime_ut()
if (BUILD_TESTING)
foreach (TEST IN ITEMS StubFileTest PosixFileTest StubMutexTest PosixMutexTest) # add? : StubTaskTest PosixTaskTest
foreach (TEST IN ITEMS StubFileTest PosixFileTest StubMutexTest PosixMutexTest StubTaskTest PosixTaskTest)
if (TARGET "${TEST}")
add_dependencies("Os_ut_exe" "${TEST}")
endif()
Expand Down
4 changes: 2 additions & 2 deletions Os/Posix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ set(HEADER_FILES
"${CMAKE_CURRENT_LIST_DIR}/Task.hpp"
)

set(MOD_DEPS Os_Posix_Shared Fw/Time Os) # Os needs to be removed here?
set(MOD_DEPS Os_Posix_Shared Fw/Time)
register_fprime_module(Os_Task_Posix)
register_fprime_implementation(Os/Task Os_Task_Posix "${CMAKE_CURRENT_LIST_DIR}/DefaultTask.cpp")

Expand All @@ -74,7 +74,7 @@ set(SOURCE_FILES
set(HEADER_FILES
"${CMAKE_CURRENT_LIST_DIR}/Mutex.hpp"
)
set(MOD_DEPS Os_Posix_Shared)
set(MOD_DEPS Os_Posix_Shared Fw/Time)
register_fprime_module(Os_Mutex_Posix)
register_fprime_implementation(Os/Mutex Os_Mutex_Posix "${CMAKE_CURRENT_LIST_DIR}/DefaultMutex.cpp")

Expand Down
2 changes: 1 addition & 1 deletion Os/Posix/DefaultTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// \brief sets default Os::Task to posix implementation via linker
// ======================================================================
#include <cerrno>
#include "Os/Task.hpp"
#include <Fw/Time/Time.hpp>
#include "Os/Posix/Task.hpp"
#include "Os/Delegate.hpp"

Expand Down
1 change: 1 addition & 0 deletions Os/Stub/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ set(UT_MOD_DEPS
Os
Os_Models
STest
Fw/Time
)
choose_fprime_implementation(Os/Mutex Os_Mutex_Test_Stub)
register_fprime_ut(StubMutexTest)
2 changes: 1 addition & 1 deletion Os/Stub/test/DefaultTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// \brief sets default Os::Task to test stub implementation via linker
// ======================================================================
#include <cerrno>
#include "Os/Task.hpp"
#include <Fw/Time/Time.hpp>
#include "Os/Stub/test/Task.hpp"
#include "Os/Delegate.hpp"
#include <sys/time.h>
Expand Down

0 comments on commit 7a27ec9

Please sign in to comment.