Skip to content
Snippets Groups Projects
Commit 242b8539 authored by Suru Dissanaike's avatar Suru Dissanaike
Browse files

Update README.md

parent 0873d8bf
Branches
Tags
No related merge requests found
......@@ -13,6 +13,9 @@ The tests mentioned above should not be hardware dependent, it should be possibl
## 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
* make / make all
......@@ -34,31 +37,33 @@ graph LR;
ID3(Building)-->ID4(Unit Testing);
ID4(Unit Testing)-->ID5(Unit Test Coverage);
ID5(Unit Test Coverage)-->ID6(Integration/Functional testing)
ID6(Integration/Functional testing)-->ID7(Dynamic Code Analysis);
ID6(Integration/Functional testing/API testing)-->ID7(Dynamic Code Analysis);
```
<details>
<summary>Prerequisites for different stages</summary>
### Prerequisite Static Code Analysis (SCA)
Basically none, the SCA can be done even if the code does not compile.
### Prerequisite Format Check
TBD
None
### Prerequisite Building
TBD
Libraries that are needed to build will be part of the Docker image.
### Prerequisite Unit Testing
TBD
None
### Prerequisite Unit Test Coverage
TBD
None
### Prerequisite Integration/Functional testing
TBD
Each module will most likely have a unique configuration, for example supervisord conf, json schema etc.
### Prerequisite Dynamic Code Analysis
TBD
</details>
......@@ -84,7 +89,7 @@ Some of the checks that are supported include:
* Automatic variable checking
* Bounds checking for array overruns
* Classes checking (e.g. unused functions, variable initialization and memory duplication)
* Classes checking (e.g. unused functions, variable initialisation and memory duplication)
* Usage of deprecated or superseded functions according to Open Group[3]
* Exception safety checking, for example usage of memory allocation and destructor checks
* Memory leaks, e.g. due to lost scope without deallocation
......@@ -96,7 +101,6 @@ Some of the checks that are supported include:
</details>
### flawfinder
FlawFinder is a tool that scans your C/C++ source code for calls to typical vulnerable library functions.
......@@ -121,7 +125,7 @@ The **Copy/Paste Detector (CPD)** tool will find duplicate blocks of code.
<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 describesin-depth strategies, use cases and explanations.
Advice on refactoring can be found [here] (https://refactoring.guru/smells/duplicate-code), the link describes in-depth strategies, use cases and explanations.
[Source](https://pmd.github.io/pmd/pmd_userdocs_cpd.html)
</details>
......@@ -129,14 +133,39 @@ Advice on refactoring can be found [here] (https://refactoring.guru/smells/dupli
## Format Checking
CI interface:
* make format-check
## Building
CI interface:
* make
* make all
## Unit Testing
CI interface:
* make check
## Unit Test Coverage
CI interface:
* make run-code-coverage-metrics
## Integration/Functional testing/API testing
### API testing
API testing or API validation is done using the ubus-api-validation tool.
ubus-api-validator will validate your ubus method call using your schema.
The input to the validator is a json file or directory that contains the methods you want to validate.
Your schema must be placed in the following directory /usr/share/rpcd/schemas.
See following the [project](https://dev.iopsys.eu/Training/userspace-developer/ubus-demo) for a complete example which includes gitlab CI.
## Integration/Functional testing
## Dynamic Code Analysis
......@@ -145,5 +174,5 @@ Advice on refactoring can be found [here] (https://refactoring.guru/smells/dupli
* Detect memory leaks
* Uninitialized accesses
* Concurrency issues
* Undefined behavior situations
* Undefined behaviour situations
* Etc.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment