Skip to content

Commit

Permalink
Fix nasa#77, deprecate PSP stubs from MD coverage test
Browse files Browse the repository at this point in the history
The PSP now provides the complete set of stubs.

IMPORTANT: This needs to be used in conjunction with nasa/PSP#436 to
get the complete set of stubs, otherwise linking will fail.
  • Loading branch information
jphickey committed Aug 15, 2024
1 parent 40aeed1 commit f50c45f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 49 deletions.
10 changes: 1 addition & 9 deletions unit-test/md_dwell_pkt_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,15 +353,7 @@ void MD_DwellLoop_Test_DataError(void)

UtAssert_True(strCmpResult == 0, "Event string matched expected result, '%s'", context_CFE_EVS_SendEvent[0].Spec);

call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));

UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1",
call_count_CFE_EVS_SendEvent);

call_count_CFE_EVS_SendEvent = UT_GetStubCount(UT_KEY(CFE_EVS_SendEvent));

UtAssert_True(call_count_CFE_EVS_SendEvent == 1, "CFE_EVS_SendEvent was called %u time(s), expected 1",
call_count_CFE_EVS_SendEvent);
UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 3);
}

void MD_GetDwellData_Test_MemRead8Error(void)
Expand Down
40 changes: 0 additions & 40 deletions unit-test/utilities/md_test_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,43 +96,3 @@ void MD_Test_TearDown(void)
{
/* cleanup test environment */
}

int32 CFE_PSP_MemWrite8(cpuaddr MemoryAddress, uint8 ByteValue)
{
if (!MemoryAddress)
return -1;
else
return CFE_PSP_SUCCESS;
}

int32 CFE_PSP_MemRead16(cpuaddr MemoryAddress, uint16 *uint16Value)
{
if (!MemoryAddress)
return -2;
else
return CFE_PSP_SUCCESS;
}

int32 CFE_PSP_MemWrite16(cpuaddr MemoryAddress, uint16 uint16Value)
{
if (!MemoryAddress)
return -1;
else
return CFE_PSP_SUCCESS;
}

int32 CFE_PSP_MemRead32(cpuaddr MemoryAddress, uint32 *uint32Value)
{
if (!MemoryAddress)
return -3;
else
return CFE_PSP_SUCCESS;
}

int32 CFE_PSP_MemWrite32(cpuaddr MemoryAddress, uint32 uint32Value)
{
if (!MemoryAddress)
return -1;
else
return CFE_PSP_SUCCESS;
}

0 comments on commit f50c45f

Please sign in to comment.