Skip to content

Commit

Permalink
added necessary steps for running code coverage check job
Browse files Browse the repository at this point in the history
  • Loading branch information
niwciu committed Nov 13, 2024
1 parent 7dc27c1 commit 3c360e8
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/CI_pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ jobs:
uses: actions/download-artifact@v4
with:
name: modbus_unit_tests_app

- name: Run Unit Tests
run: |
chmod +x modbus_test
Expand All @@ -99,11 +100,24 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v4

- name: Download Unit Tests Build Artifacts
uses: actions/download-artifact@v4
with:
name: modbus_unit_tests_app
path: test/modbus/out

- name: Run Unit Tests
continue-on-error: true
run: arm-none-eabi-gcc --version # This step will fail
- name: Check Code Coverage
run: echo "test" # This step will not fail
working-directory: test/modbus/out
run: |
chmod +x modbus_test
./modbus_test -v
- name: Check Test Coverage
uses: threeal/[email protected]
with:
fail-under-line: 90

run_cppcheck:
name: Run CppCheck
Expand Down
8 changes: 4 additions & 4 deletions test/modbus/slave_RTU_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,10 @@ TEST(Slave_RTU_test, GivenModbusSlaveInitAndReadCoilsReqWithProperSlaveIdAndProp
TEST_ASSERT_EQUAL(MODBUS_SLAVE_IDLE, slave_manager_state_machine);
}

TEST(Slave_RTU_test, test)
{
TEST_FAIL_MESSAGE("ADDED_NEW_TEST")
}
// TEST(Slave_RTU_test, )
// {
// TEST_FAIL_MESSAGE("ADDED_NEW_TEST")
// }

// TEST(Slave_RTU_test, )
// {
Expand Down
2 changes: 1 addition & 1 deletion test/modbus/slave_RTU_test_runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ TEST_GROUP_RUNNER(Slave_RTU_test)
RUN_TEST_CASE(Slave_RTU_test, GivenModbusSlaveInitAndReadCoilsReqWithProperSlaveIdAndProperCrcRecivedAndTimer1_5CharTrigerAndTimer3_5CharTrigerThenSlavePrepareRespond);
RUN_TEST_CASE(Slave_RTU_test, GivenModbusSlaveInitAndReadCoilsReqWithProperSlaveIdAndProperCrcRecivedAndTimer1_5CharTrigerAndTimer3_5CharTrigerThenSlaveSendRespAndGoToModbuSlaveTransmitingResp);
RUN_TEST_CASE(Slave_RTU_test, GivenModbusSlaveInitAndReadCoilsReqWithProperSlaveIdAndProperCrcRecivedAndTimer1_5CharTrigerAndTimer3_5CharTrigerAndSlaveSendingRespWhenWholeRespSendThenInitMsgBuffAndGoToIdleState);
RUN_TEST_CASE(Slave_RTU_test, test);
// RUN_TEST_CASE(Slave_RTU_test, );
// RUN_TEST_CASE(Slave_RTU_test, );
// RUN_TEST_CASE(Slave_RTU_test, );
// RUN_TEST_CASE(Slave_RTU_test, );
Expand Down

0 comments on commit 3c360e8

Please sign in to comment.