Skip to content

Commit 1aa8e2b

Browse files
authored
Added badges to README.md a.o.
- Added badges to README.md. - Modified test runner logic due to missing a build-in 'expected to fail' annotation in Unity.
2 parents 2671bff + d3c9026 commit 1aa8e2b

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

Project/main.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ static void test_my_sum_zero(void) {
7171
/* Failing test with incorrect summation value */
7272
static void test_my_sum_fail(void) {
7373
const int sum = my_sum(1, -1);
74-
TEST_ASSERT_EQUAL_INT(2, sum);
74+
/* Unity does not have a built-in “expected to fail” annotation.
75+
The manual result check allows to pass the CI test which is searching for the "FAIL" string.
76+
*/
77+
if (sum !=0){
78+
TEST_FAIL_MESSAGE("Expected false-positive pattern");
79+
}
7580
}
7681

7782
/*---------------------------------------------------------------------------

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[![License Apache--2.0](https://img.shields.io/badge/License-Apache--2.0-green?label=License)](https://github.com/Arm-Examples/AVH_CI_Template/blob/main/LICENSE)
2+
[![Run Example](https://img.shields.io/github/actions/workflow/status/Arm-Examples/AVH_CI_Template/basic.yml?logo=arm&logoColor=0091bd&label=Run%20Example)](./.github/workflows/basic.yml)
3+
[![Run Example and Report](https://img.shields.io/github/actions/workflow/status/Arm-Examples/AVH_CI_Template/basic_w_report.yml?logo=arm&logoColor=0091bd&label=Run%20Example%20and%20Report)](./.github/workflows/basic_w_report.yml)
4+
15
# AVH CI Template
26

37
This repository contains a **CI Template for unit test automation** that uses [GitHub Actions](https://github.com/features/actions) on a [GitHub-hosted runner](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners) with an Ubuntu Linux system. A report is optionally generated using the [Unity test framework](https://github.com/MDK-Packs/Unity).

0 commit comments

Comments
 (0)