Skip to content

Commit

Permalink
Fix #94, deprecate PSP stubs in MM coverage tets
Browse files Browse the repository at this point in the history
The PSP now provides the full set of stubs.

IMPORTANT: This needs to be merged in conjunction with nasa/PSP#436 to
obtain the complete set of stubs.  Otherwise the link will fail.
  • Loading branch information
jphickey committed Aug 15, 2024
1 parent b8fb572 commit 2d6482a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 78 deletions.
8 changes: 4 additions & 4 deletions unit-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ target_include_directories(coverage-mm_internal-stubs PUBLIC ../fsw/src)
# Accomplish this by cycling through all the app's source files, there must be
# a *_tests file for each
foreach(SRCFILE ${APP_SRC_FILES})
# Get the base sourcefile name as a module name without path or the

# Get the base sourcefile name as a module name without path or the
# extension, this will be used as the base name of the unit test file.
get_filename_component(UNIT_NAME "${SRCFILE}" NAME_WE)

# Use the module name to make the test name by adding _tests to the end
set(TESTS_NAME "${UNIT_NAME}_tests")

# Make the test sourcefile name with unit test path and extension
set(TESTS_SOURCE_FILE "${PROJECT_SOURCE_DIR}/unit-test/${TESTS_NAME}.c")

Expand All @@ -46,5 +46,5 @@ foreach(SRCFILE ${APP_SRC_FILES})

# Add dependency to utilities and internal stubs
add_cfe_coverage_dependency(mm "${UNIT_NAME}" mm_internal)

endforeach()
74 changes: 0 additions & 74 deletions unit-test/utilities/mm_test_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,77 +94,3 @@ void MM_Test_TearDown(void)
{
/* cleanup test environment */
}

/*
* Placeholder stubs until PSP UT implementation is available
*/

int32 CFE_PSP_EepromWriteEnable(uint32 Bank)
{
int32 status;
status = UT_DEFAULT_IMPL(CFE_PSP_EepromWriteEnable);
return status;
}

int32 CFE_PSP_EepromWriteDisable(uint32 Bank)
{
int32 status;
status = UT_DEFAULT_IMPL(CFE_PSP_EepromWriteDisable);
return status;
}

int32 CFE_PSP_EepromWrite32(cpuaddr MemoryAddress, uint32 uint32Value)
{
int32 status;
status = UT_DEFAULT_IMPL(CFE_PSP_EepromWrite32);
return status;
}

int32 CFE_PSP_EepromWrite16(cpuaddr MemoryAddress, uint16 uint16Value)
{
int32 status;
status = UT_DEFAULT_IMPL(CFE_PSP_EepromWrite16);
return status;
}

int32 CFE_PSP_EepromWrite8(cpuaddr MemoryAddress, uint8 ByteValue)
{
int32 status;
status = UT_DEFAULT_IMPL(CFE_PSP_EepromWrite8);
return status;
}

int32 CFE_PSP_MemWrite8(cpuaddr MemoryAddress, uint8 ByteValue)
{
int32 status;
status = UT_DEFAULT_IMPL(CFE_PSP_MemWrite8);
return status;
}

int32 CFE_PSP_MemRead16(cpuaddr MemoryAddress, uint16 *uint16Value)
{
int32 status;
status = UT_DEFAULT_IMPL(CFE_PSP_MemRead16);
return status;
}

int32 CFE_PSP_MemWrite16(cpuaddr MemoryAddress, uint16 uint16Value)
{
int32 status;
status = UT_DEFAULT_IMPL(CFE_PSP_MemWrite16);
return status;
}

int32 CFE_PSP_MemRead32(cpuaddr MemoryAddress, uint32 *uint32Value)
{
int32 status;
status = UT_DEFAULT_IMPL(CFE_PSP_MemRead32);
return status;
}

int32 CFE_PSP_MemWrite32(cpuaddr MemoryAddress, uint32 uint32Value)
{
int32 status;
status = UT_DEFAULT_IMPL(CFE_PSP_MemWrite32);
return status;
}

0 comments on commit 2d6482a

Please sign in to comment.