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

Som devel 20 #69

Merged
merged 3 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .gitHooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
#!/usr/bin/bash
# use: git config core.hooksPath .gitHooks

# availabilty of python
py=$(which py || which python || which python3)
if [[ -z $py ]]
then
echo "No python found"
exit 0
fi

# go to the root of the git repo
cd $(git rev-parse --show-toplevel)

# path to sompy python scripts
sompy=$(pwd)/sompy/somutil

mdjs=
svgs=
# files regarded as text files to be cleaned
txts=
# extensions of text files sorted by likeliness
xtxt="h cpp cmd py md"

for file in `git diff-index --cached --name-only HEAD`;
do
for file in `git diff-index --cached --name-only HEAD`; do
if [[ -f $file ]]
then
if [[ $file == *.mdj ]]; then mdjs="$mdjs $file"
elif [[ $file == *.svg ]]; then svgs="$svgs $file"
elif [[ $file == *.py ]] || [[ $file == *.cpp ]] || [[ $file == *.h ]] || [[ $file == *.cmd ]]
then
txts="$txts $file"
else
for ext in $xtxt; do
if [[ $file == *.$ext ]]; then txts="$txts $file"; break; fi
done
fi
fi
done
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ __pycache__
tmp.*
tmp_*
old_*
tmp

# vscode
tempCodeRunnerFile.py
Expand Down
4 changes: 2 additions & 2 deletions SIL4.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# meeting SIL4 (safety integrity level 4)
EN 50128 / EN 50129
EN 50128 / EN 50129

## gitLab / github process
### peer review
Expand Down Expand Up @@ -45,4 +45,4 @@ Additional flags see header of [premake5_vs.lua](make/premake5_vs.lua)
## code coverage
Application code coverage by tests must be 100%.

See also [remarks on code coverage](testing/coverage_tools.md)
See also [code coverage tools](testing/coverage_tools.md)
1 change: 0 additions & 1 deletion make/bullseye/_covstep1.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ if %_cleanreports% == 1 (
if %_premake% == 1 (
echo - premake for %_vsversion%
call premake5 --file=%premakeFile% %_vsversion%
set _cleanbuild=1
)

if %_cleanbuild% == 1 (
Expand Down
23 changes: 11 additions & 12 deletions testing/coverage_bullseye.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# current bullseye coverage
### modTests 16.10.2024 18:24:47,67
```
# current bullseye coverage

### modTests 16.10.2024 19:38:34,49
```
Directory Function Coverage C/D Coverage
------------------------------- ----------------- ----------------
application/components/ 128 / 128 = 100% 315 / 316 = 99%
Expand All @@ -22,11 +22,11 @@ specification/codebase/ 2 / 2 = 100% 0 / 0
specification/ifs/ 3 / 3 = 100% 0 / 0
------------------------------- ----------------- ----------------
Total 133 / 133 = 100% 315 / 316 = 99%
covmin 100,99 passed
```
### sysTests 16.10.2024 18:27:29,41
```
covmin 100,99 passed
```

### sysTests 16.10.2024 19:39:10,30
```
Directory Function Coverage C/D Coverage
------------------------------- ----------------- ----------------
application/ 100 / 143 = 69% 107 / 322 = 33%
Expand All @@ -49,6 +49,5 @@ specification/codebase/ 2 / 2 = 100% 0 / 0
specification/ifs/ 3 / 3 = 100% 0 / 0
------------------------------- ----------------- ----------------
Total 105 / 148 = 70% 107 / 322 = 33%
covmin 50,30 passed
```

covmin 50,30 passed
```
8 changes: 4 additions & 4 deletions testing/coverage_tools.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# code coverage
# code coverage tools
## bullseye
Bullseye coverage turned out a most excellent tool.

Expand All @@ -10,9 +10,9 @@ It analyses:

It can generate several outputs from simple text to html documentation.

It's available for Windows and Linux.
It's available for Windows and Linux.

Bullseye is not for free - but they provide a free trial period.
Bullseye is not for free - but they provide a free trial period.

- [current text report](coverage_bullseye.md)
- [sample html report](http://dstw.sorgo.de/bullseye/)
Expand All @@ -22,7 +22,7 @@ Gcov comes with gnu compiler collection (gcc) and therefore is available
- on a standard linux
- for the github CI

It
It
- provides a very limited impression of the source code coverage
- is quite useless with headers

Expand Down
Loading