Skip to content

Commit

Permalink
Merge pull request #1772 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
cFE Integration candidate: 2021-08-10
  • Loading branch information
astrogeco authored Aug 11, 2021
2 parents cfadad6 + a1b4529 commit eb9c523
Show file tree
Hide file tree
Showing 49 changed files with 1,485 additions and 727 deletions.
32 changes: 24 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@ The detailed cFE user's guide can be viewed at <https://github.com/nasa/cFS/blob

## Version History

### Development Build: v6.8.0-rc1+dev844

- Move global count into test global struct
- Add ES application control API functional tests
- Add null pointer check to CFE_ES_ReloadApp functional test
- Add Generic Counter API test
- Update coverage test to use UtAssert macros
- Add resource ID API functional tests
- Fix last char truncated in coverage log output
- Fix typos in some copyright headers
- Add misc time api functional test
- Add Functional Test for EVS Reset Filters API
- Replace cFE_FTAssert_VOIDCALL with new UtAssert_VOIDCALL
- Remove multiple instantiations of CFE_FT_Global
- Add functional tests for cFE Table APIs

### Development Build: v6.8.0-rc1+dev810

- Add null pointer check to table GetAddresses and ReleaseAddresses
Expand Down Expand Up @@ -252,19 +268,19 @@ Updates the doxygen documentation for this parameter, as it was incorrectly spec
### Development Build: v6.8.0-rc1+dev402

- HOTFIX 20210312, updates to work with older CMake
- Fix #972, reorganize directory structure
- reorganize directory structure
- HOTFIX IC 2021-03-05: Correct static app build issue
- See <https://github.com/nasa/cFE/pull/1222>

### Development Build: v6.8.0-rc1+dev392

- Fix #665, update pipe name documentation.
- Fix #1165, remove configs about shells
- Fix #1094, Update CRC documentation
- Fix #979, add stack size and priority to task info …
- Fix #1170, refactor target config objects …
- Fix #1207, Add wrapper targets to simplify app builds …
- Fix #1211, Add Testing Tools to the Security Policy
- update pipe name documentation.
- remove configs about shells
- Update CRC documentation
- add stack size and priority to task info …
- refactor target config objects …
- Add wrapper targets to simplify app builds …
- Add Testing Tools to the Security Policy
- See <https://github.com/nasa/cFE/pull/1213>

### Development Build: v6.8.0-rc1+dev382
Expand Down
2 changes: 1 addition & 1 deletion modules/cfe_assert/src/cfe_assert_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
** See the License for the specific language governing permissions and
** limitations under the License.
**
** File: cfe_assert_main.c
** File: cfe_assert_init.c
**
** Purpose:
** Implementation of the CFE assert (UT assert wrapper) functions.
Expand Down
2 changes: 1 addition & 1 deletion modules/cfe_assert/src/cfe_assert_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
** See the License for the specific language governing permissions and
** limitations under the License.
**
** File: cfe_assert.h
** File: cfe_assert_priv.h
**
** Purpose:
** Specification for the CFE assert (UT assert wrapper) functions.
Expand Down
2 changes: 1 addition & 1 deletion modules/cfe_assert/src/cfe_assert_runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
** See the License for the specific language governing permissions and
** limitations under the License.
**
** File: cfe_testrunner_main.c
** File: cfe_assert_runner.c
**
** Purpose:
** Implementation of the CFE testrunner (UT testrunner wrapper) functions.
Expand Down
15 changes: 14 additions & 1 deletion modules/cfe_testcase/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
include_directories(inc)

# Filenames based on doxygen groups.
# Create the app module
add_cfe_app(cfe_testcase
add_cfe_app(cfe_testcase
src/cfe_test.c
src/cfe_test_table.c
src/es_application_control_test.c
src/es_info_test.c
src/es_task_test.c
src/es_cds_test.c
src/es_counter_test.c
src/es_misc_test.c
src/es_mempool_test.c
src/es_resource_id_test.c
src/evs_filters_test.c
src/evs_send_test.c
src/fs_header_test.c
src/fs_util_test.c
src/message_id_test.c
src/sb_pipe_mang_test.c
src/tbl_content_access_test.c
src/tbl_content_mang_test.c
src/tbl_information_test.c
src/tbl_registration_test.c
src/time_arithmetic_test.c
src/time_current_test.c
src/time_conversion_test.c
src/time_misc_test.c
)

# register the dependency on cfe_assert
add_cfe_app_dependency(cfe_testcase cfe_assert)
add_cfe_tables(cfeTestAppTable tables/cfe_test_tbl.c)
46 changes: 46 additions & 0 deletions modules/cfe_testcase/inc/cfe_test_tbl.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*************************************************************************
**
** GSC-18128-1, "Core Flight Executive Version 6.7"
**
** Copyright (c) 2006-2019 United States Government as represented by
** the Administrator of the National Aeronautics and Space Administration.
** All Rights Reserved.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
**
** File: cfe_test_table.h
**
** Purpose:
** CFE Test Table struct definition
**
*************************************************************************/

/**
* @file
*
* CFE Test Table struct definition
*/

#ifndef CFE_TEST_TBL_H
#define CFE_TEST_TBL_H

/*
* Test table structure
*/
typedef struct
{
uint16 Int1;
uint16 Int2;
} TBL_TEST_Table_t;

#endif /* CFE_TEST_TBL_H */
16 changes: 16 additions & 0 deletions modules/cfe_testcase/src/cfe_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,19 @@
#include "cfe_assert.h"
#include "cfe_test.h"

CFE_FT_Global_t CFE_FT_Global;

/*
* Test main function
* Register this test routine with CFE Assert
*/
void CFE_TestMain(void)
{
/* Constant Table information used by all table tests */
CFE_FT_Global.TblName = "TestTable";
CFE_FT_Global.RegisteredTblName = "CFE_TEST_APP.TestTable";
CFE_FT_Global.TblFilename = "test_tbl.tbl";

/*
* Register this test app with CFE assert
*
Expand All @@ -51,19 +58,28 @@ void CFE_TestMain(void)
/*
* Register test cases in UtAssert
*/
ESApplicationControlTestSetup();
ESCDSTestSetup();
ESCounterTestSetup();
ESInfoTestSetup();
ESMemPoolTestSetup();
ESMiscTestSetup();
ESResourceIDTestSetup();
ESTaskTestSetup();
EVSFiltersTestSetup();
EVSSendTestSetup();
FSHeaderTestSetup();
FSUtilTestSetup();
MessageIdTestSetup();
SBPipeMangSetup();
TBLContentAccessTestSetup();
TBLContentMangTestSetup();
TBLInformationTestSetup();
TBLRegistrationTestSetup();
TimeArithmeticTestSetup();
TimeCurrentTestSetup();
TimeConversionTestSetup();
TimeMiscTestSetup();

/*
* Execute the tests
Expand Down
26 changes: 22 additions & 4 deletions modules/cfe_testcase/src/cfe_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
** See the License for the specific language governing permissions and
** limitations under the License.
**
** File: cfe_test.c
** File: cfe_test.h
**
** Purpose:
** Initialization routine for CFE functional test
Expand All @@ -39,15 +39,27 @@
* Includes
*/
#include "cfe.h"
#include "cfe_test_tbl.h"

#include "uttest.h"
#include "utassert.h"

typedef struct
{
CFE_FS_FileWriteMetaData_t FuncTestState;

/* Generic utility counter */
int Count;

/* Table information used by all table tests */
CFE_TBL_Handle_t TblHandle;
const char * TblName;
const char * RegisteredTblName;
const char * TblFilename;
} CFE_FT_Global_t;

extern CFE_FT_Global_t CFE_FT_Global;

/**
* Name of log file to write
*
Expand All @@ -74,24 +86,30 @@ typedef struct
UtAssert_True(rcact < CFE_SUCCESS, "%s == (%ld) ", #actual, (long)rcact); \
} while (0)

/* Log calls to void functions */
#define cFE_FTAssert_VOIDCALL(func) (func, UtAssert(true, #func, __FILE__, __LINE__))

bool TimeInRange(CFE_TIME_SysTime_t Time, CFE_TIME_SysTime_t Target, OS_time_t difference);

void CFE_TestMain(void);
void ESApplicationControlTestSetup(void);
void ESCDSTestSetup(void);
void ESCounterTestSetup(void);
void ESInfoTestSetup(void);
void ESMemPoolTestSetup(void);
void ESMiscTestSetup(void);
void ESResourceIDTestSetup(void);
void ESTaskTestSetup(void);
void EVSFiltersTestSetup(void);
void EVSSendTestSetup(void);
void FSHeaderTestSetup(void);
void FSUtilTestSetup(void);
void MessageIdTestSetup(void);
void SBPipeMangSetup(void);
void TBLContentAccessTestSetup(void);
void TBLContentMangTestSetup(void);
void TBLInformationTestSetup(void);
void TBLRegistrationTestSetup(void);
void TimeArithmeticTestSetup(void);
void TimeCurrentTestSetup(void);
void TimeConversionTestSetup(void);
void TimeMiscTestSetup(void);

#endif /* CFE_TEST_H */
49 changes: 49 additions & 0 deletions modules/cfe_testcase/src/cfe_test_table.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/*************************************************************************
**
** GSC-18128-1, "Core Flight Executive Version 6.7"
**
** Copyright (c) 2006-2019 United States Government as represented by
** the Administrator of the National Aeronautics and Space Administration.
** All Rights Reserved.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
**
** File: cfe_test_table.c
**
** Purpose:
** Initialization of variables used by table functional tests and
** function definitions for setup and teardown table functions
**
*************************************************************************/

/*
* Includes
*/

#include "cfe_test.h"
#include "cfe_test_table.h"

/* Setup function to register a table */
void RegisterTestTable(void)
{

UtAssert_INT32_EQ(CFE_TBL_Register(&CFE_FT_Global.TblHandle, CFE_FT_Global.TblName, sizeof(TBL_TEST_Table_t),
CFE_TBL_OPT_DEFAULT, NULL),
CFE_SUCCESS);
}

/* Teardown function to unregister a table */
void UnregisterTestTable(void)
{
UtAssert_INT32_EQ(CFE_TBL_Unregister(CFE_FT_Global.TblHandle), CFE_SUCCESS);
}
45 changes: 45 additions & 0 deletions modules/cfe_testcase/src/cfe_test_table.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*************************************************************************
**
** GSC-18128-1, "Core Flight Executive Version 6.7"
**
** Copyright (c) 2006-2019 United States Government as represented by
** the Administrator of the National Aeronautics and Space Administration.
** All Rights Reserved.
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
**
** File: cfe_test_table.h
**
** Purpose:
** Declare global struct variable and function prototypes for table tests
**
*************************************************************************/

/**
* @file
*
* Declarations and prototypes for cfe_test module table tests
*/

#ifndef CFE_TEST_TABLE_H
#define CFE_TEST_TABLE_H

/*
* Includes
*/
#include "cfe_test.h"

void RegisterTestTable(void);
void UnregisterTestTable(void);

#endif /* CFE_TEST_TABLE_H */
Loading

0 comments on commit eb9c523

Please sign in to comment.