Skip to content

Commit

Permalink
Fix #2352, make shared tbl configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
dmknutsen committed May 25, 2023
1 parent b429d91 commit 5bb5efe
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions modules/cfe_testcase/src/cfe_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ extern CFE_FT_Global_t CFE_FT_Global;
*/
#define CFE_ASSERT_LOG_FILE_NAME "/cf/cfe_test.log"

/**
* Name of the shared table used by CFE_TEST_APP for requirements verification
*
* This filename was made configurable such that projects can replace the
* sample app table with a project specific table for the purpose of CI/CD.
*/
#define SHARED_TABLE_NAME "SAMPLE_APP.SampleAppTable"

void TimeInRange(CFE_TIME_SysTime_t Start, CFE_TIME_SysTime_t Time, CFE_TIME_SysTime_t Range, const char *Str);

void CFE_TestMain(void);
Expand Down
2 changes: 1 addition & 1 deletion modules/cfe_testcase/src/tbl_content_access_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void TestGetAddress(void)
TBL_TEST_Table_t TestTable = {1, 2};

CFE_TBL_Handle_t SharedTblHandle = CFE_TBL_BAD_TABLE_HANDLE;
const char * SharedTblName = "SAMPLE_APP.SampleAppTable";
const char * SharedTblName = SHARED_TABLE_NAME;

UtPrintf("Testing: CFE_TBL_GetAddress");

Expand Down
2 changes: 1 addition & 1 deletion modules/cfe_testcase/src/tbl_information_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void TestGetInfo(void)
void TestNotifyByMessage(void)
{
CFE_TBL_Handle_t SharedTblHandle = CFE_TBL_BAD_TABLE_HANDLE;
const char * SharedTblName = "SAMPLE_APP.SampleAppTable";
const char * SharedTblName = SHARED_TABLE_NAME;
CFE_SB_MsgId_t TestMsgId = CFE_SB_ValueToMsgId(CFE_TEST_CMD_MID);
CFE_MSG_FcnCode_t TestCmdCode = 0;
uint32 TestParameter = 0;
Expand Down
2 changes: 1 addition & 1 deletion modules/cfe_testcase/src/tbl_registration_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void TestTableShare(void)
{
UtPrintf("Testing: CFE_TBL_Share");
CFE_TBL_Handle_t SharedTblHandle;
const char * SharedTblName = "SAMPLE_APP.SampleAppTable";
const char * SharedTblName = SHARED_TABLE_NAME;
const char * BadTblName = "SampleAppTable";

UtAssert_INT32_EQ(CFE_TBL_Share(NULL, SharedTblName), CFE_TBL_BAD_ARGUMENT);
Expand Down

0 comments on commit 5bb5efe

Please sign in to comment.