@@ -8,174 +8,3 @@ Shared pipelines for CI. Different types of testing that is done in the CI pipel
* Functional testing is defined as testing a slice of functionality in the system (may interact with dependencies) to verify that the code is doing the right things
The tests mentioned above should not be hardware dependent, it should be possible to execute the tests in a single Docker container.
## CI interface for make/cmake
It is fine to use either CMake or Make as long as the following commands are supported.
* make format **note not used by CI**
* make format-check **note not used by CI**
* make / make all
* make unit-test
* make functional-test
* make coverage
**Each make command must have the return code 0 to indicate pass or other value for a failer.**
[GNU Make naming conventions](https://www.gnu.org/prep/standards/html_node/Standard-Targets.html#Standard-Targets)
## iopsys CI workflow
```mermaid
graph LR;
ID1(Static Code Analysis)-->ID2(Building);
ID2(Building)-->ID3(Functional API testing)
ID3(Functional API testing) --> ID7(Dynamic Code Analysis);
ID2(Building)-->ID4(Unit Testing);
ID4(Unit Testing)-->ID5(Unit Test Coverage);
ID5(Unit Test Coverage)-->ID7(Dynamic Code Analysis);
* Calls to library functions potentially vulnerable to string formatting attacks (sprintf, printf, ...)
* Potential race conditions in file handling.
[Source](https://dwheeler.com/flawfinder/)
</details>
### cpd
The **Copy/Paste Detector (CPD)** tool will find duplicate blocks of code.
<details>
<summary>More</summary>
If duplicates are found, analyse the code block and consider refactoring the code.
Advice on refactoring can be found [here] (https://refactoring.guru/smells/duplicate-code), the link describes in-depth strategies, use cases and explanations.