Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: start making integrity checks reusable #13

Open
mkschreder opened this issue Nov 16, 2022 · 0 comments
Open

ci: start making integrity checks reusable #13

mkschreder opened this issue Nov 16, 2022 · 0 comments

Comments

@mkschreder
Copy link
Contributor

Current SDK ci comes with many nice integrity patterns that verify integrity (for example that tests exist for each source file etc) of this SDK repository.

However, these checks are not easy to include as keywords into integrity checks of projects using the SDK because some of these checks are implemented as tests and not keywords.

In order to facilitate reuse of integrity checks, the checks have to be separated into 1. robotframework library that implements the keywords 2. the tests that apply these keywords to this particular repository.

In this way, any external project using this SDK will be able to simply reuse the same keywords in project specific integrity checks.

mkschreder added a commit that referenced this issue Nov 16, 2022
## What has been done

- Renamed scrum to integrity
- Added two new reusable integrity libraries that can be included into
projects that use SDK: DirectoryStructure.robot and Tests.robot.
- New file naming pattern: Capitalized = shared libraries, lowercase:
original integrity checks that are kept for now
- Added new variable "INTEGRITY_DIR" that points to the main integrity
folder

## Proof

- No functional changes done, just restructuring/moving of files

External project can now include integrity checks by using INTEGRITY_DIR
variable:

```
*** Settings ***
Library  OperatingSystem
Resource  ${INTEGRITY_DIR}/infrastructure/DirectoryStructure.robot

*** Test Cases ***

Apps have proper directory structure
	Directory has apps structure ${ROOT_DIR}/apps
Samples have proper directory structure
	Directory has samples structure ${ROOT_DIR}/samples
Boards have proper directory structure
	Directory has boards structure ${ROOT_DIR}/boards
CMake have proper directory structure
	Directory has cmake structure ${ROOT_DIR}/cmake
Drivers have proper directory structure
	Directory has drivers structure ${ROOT_DIR}/drivers
Lib have proper directory structure
	Directory has lib structure ${ROOT_DIR}/lib
Scripts have proper directory structure
	Directory has scripts structure ${ROOT_DIR}/scripts
```

## Known issues/limitations

- Other modules still need to be refactored to this structure: one
reusable, the other containing local tests

Related to #13

Signed-off-by: Martin Schröder <info@swedishembedded.com>
Co-authored-by: Martin Schroeder <mkschreder.uk@googlemail.com>
Co-authored-by: Martin Schröder <info@swedishembedded.com>
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

No branches or pull requests

1 participant