Skip to content

[Cellular Library] Add ci.yml for unit-test#26

Merged
andysun2015 merged 18 commits intoFreeRTOS:mainfrom
andysun2015:cellular_add_workflow
Aug 17, 2021
Merged

[Cellular Library] Add ci.yml for unit-test#26
andysun2015 merged 18 commits intoFreeRTOS:mainfrom
andysun2015:cellular_add_workflow

Conversation

@andysun2015
Copy link
Copy Markdown
Contributor

Description of changes:

  • Add ci.yml for unit test.
  • Fix branch coverage in unit test.
  • Fix build warning in unit test.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@andysun2015 andysun2015 force-pushed the cellular_add_workflow branch from 94a3113 to b33a641 Compare August 5, 2021 15:26
andysun2015 and others added 5 commits August 5, 2021 23:27
[Cellular Library] changes for MISRA C in common/src/cellular_pktio.c

* Fix the misra c Event misra_c_2012_rule_10_8_violation and misra_c_2012_rule_8_13_violation

[Cellular Library] changes for MISRA C in common/src/cellular_pkthandler.c

1. Misra C changes for Event misra_c_2012_rule_10_8_violation and Event misra_c_2012_rule_8_13_violation

[Cellular Library Unit-Test] Remove testing configuration.

[Cellular Library] changes for MISRA C in common/src/cellular_common.c

[Cellular Library] remove one condition that never happened in common/src/cellular_at_core.c

Revert "[Cellular Library Unit-Test] Add ut code for cellular_3gpp_api.c"

This reverts commit ffe9ebe7b12ac902c559eebca9cf51aebda17f1b.

[Cellular Lib] Adjustment for coverity.

[Cellular Lib] changes for coverity

[Cellular Lib] format code and add misra configuration file.

[Cellular Lib] Fix unit test coverage caused by CBMC changes.

[Cellular Lib] Changes for misra c

[Cellular Lib]Fix misra_c_2012_rule_1_1_violation from opaque data type.

[Cellular Lib] Fix build warning from pointer-to-int-cast warnings.
[Cellular Library] changes for the full coverage in cellular_pktio.c

[Cellular Library] changes for the full coverage in cellular_at_core_utest.c

[Cellular Library] changes for the full coverage in cellular_pkthandler_utest.c

[Cellular Library] changes for the full coverage in cellular_common_api_utest.c

[Cellular Library] changes for the full coverage in cellular_common_utest.c

[Cellular Library] changes for the full coverage in cellular_3gpp_urc_handler_utest.c

[Cellular Library] changes for the full coverage in cellular_3gpp_api_utest.c

[Cellular Library] Fix build warnings in unit test
@andysun2015 andysun2015 force-pushed the cellular_add_workflow branch from b33a641 to ec564ba Compare August 5, 2021 15:29
Comment thread common/src/cellular_pktio.c
Comment thread common/src/cellular_pktio.c
Comment thread common/src/cellular_pktio.c Outdated
Comment thread common/src/cellular_pktio.c
Comment thread test/unit-test/cellular_pktio_utest.c Outdated
Comment thread test/unit-test/cellular_pktio_utest.c Outdated
Comment thread test/unit-test/cellular_3gpp_urc_handler_utest.c Outdated
chinglee-iot
chinglee-iot previously approved these changes Aug 10, 2021
Copy link
Copy Markdown
Contributor

@chinglee-iot chinglee-iot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit test branch coverage 100% and local test the cellular library with cellular demo without problem.

aggarg added 2 commits August 11, 2021 00:36
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
aggarg and others added 6 commits August 11, 2021 01:10
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
@andysun2015 andysun2015 requested a review from aggarg August 17, 2021 00:08
Copy link
Copy Markdown
Contributor

@chinglee-iot chinglee-iot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is for CI. We agree to fix the error token logic in next PR.

{
pTokenSuccessTable = pContext->tokenTable.pCellularSrcTokenSuccessTable;
tokenSuccessTableSize = pContext->tokenTable.cellularSrcTokenSuccessTableSize;
pTokenErrorTable = pContext->tokenTable.pCellularSrcTokenErrorTable;
Copy link
Copy Markdown
Contributor

@chinglee-iot chinglee-iot Aug 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original logic is that, if this is error token, it won't be saved as intermediate response.
Suggest we update the logic unless this is a bug fix.

        if( result != true )
        {
            ( void ) Cellular_ATcheckErrorCode( pLine, pTokenErrorTable,
                                                tokenErrorTableSize, &result );
                if( result == true )
            {
                pResp->status = false;
                pkStatus = CELLULAR_PKT_STATUS_OK;
                CellularLogError( "Modem return ERROR: line %s, cmd : %s, respPrefix %s, status: %d",
                                  ( pContext->pCurrentCmd != NULL ? pContext->pCurrentCmd : "NULL" ),
                                  pLine,
                                  ( pRespPrefix != NULL ? pRespPrefix : "NULL" ),
                                  pkStatus );
            }
        }

@andysun2015 andysun2015 merged commit f0260f5 into FreeRTOS:main Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants