Skip to content

Commit 8b954f6

Browse files
extras/makers-devops: Replace the code checks tools with sub modules.
Signed-off-by: Ramya Subramanyam <[email protected]>
1 parent 56b97fe commit 8b954f6

18 files changed

+35
-1006
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,6 @@
7070
[submodule "extras/mtb-libs/wpa3-external-supplicant"]
7171
path = extras/mtb-libs/wpa3-external-supplicant
7272
url = https://github.com/Infineon/wpa3-external-supplicant.git
73+
[submodule "extras/makers-devops"]
74+
path = extras/makers-devops
75+
url = https://github.com/Infineon/makers-devops.git

Makefile

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
# include test make file
2-
#include tests/arduino-core-tests/Makefile
3-
4-
51

62
FQBN ?= infineon:psoc6:cy8ckit_062s2_ai
73
TARGET ?= test_interrupts_single
84

95

106
##############################################################################################################################################################
11-
7+
CLANGTIDY_OUTPUT=_results/clang-tidy/check-clang-tidy
8+
CPPCHECK_OUTPUT=_results/cppcheck/check-cppcheck
129
clean-results:
1310
-rm -rf _results/cppcheck/* _results/clang-tidy/* _results/build/*
1411
-mkdir -p _results/cppcheck _results/clang-tidy _results/build
@@ -25,50 +22,60 @@ REGISTRY=$(DOCKER_REGISTRY)
2522

2623
DOCKER=docker run --rm -it -v $(PWD):/myLocalWorkingDir:rw $(REGISTRY)
2724

25+
CODECHECK=extras/makers-devops/tools/code_checks/codeChecks.py
26+
MERGEXML=extras/makers-devops/tools/code_checks/merge_clang_tidy_cppcheck.py
27+
PROJECTYAML=config/project.yml
28+
USERYAML=config/user.yml
29+
2830
pull-container:
2931
docker pull $(REGISTRY)
3032

3133
run-container-check-all: clean-results pull-container
32-
$(DOCKER) python3 tools/code_checks/codeChecks.py --getAllChecks
33-
$(DOCKER) python3 tools/code_checks/codeChecks.py --runAllChecks
34+
$(DOCKER) python3 $(CODECHECK) --projectYAML $(PROJECTYAML) --userYAML $(USERYAML) --getAllChecks
35+
$(DOCKER) python3 $(CODECHECK) ---projectYAML $(PROJECTYAML) --userYAML $(USERYAML) -runAllChecks
3436

3537
run-container-project-setup-script-with-show-logs: clean-results pull-container
36-
$(DOCKER) python3 tools/code_checks/codeChecks.py --getAllChecks
37-
$(DOCKER) python3 tools/code_checks/codeChecks.py --runCheck check-clang-tidy
38-
$(DOCKER) python3 tools/code_checks/codeChecks.py --runAllChecks
38+
$(DOCKER) python3 $(CODECHECK) --projectYAML $(PROJECTYAML) --userYAML $(USERYAML) --getAllChecks
39+
$(DOCKER) python3 $(CODECHECK) --projectYAML $(PROJECTYAML) --userYAML $(USERYAML) --runCheck check-clang-tidy
40+
$(DOCKER) python3 $(CODECHECK) --projectYAML $(PROJECTYAML) --userYAML $(USERYAML) --runAllChecks
3941

4042
run-container-cppcheck: pull-container
4143
-rm -rf _results/cppcheck/*
4244
-mkdir -p _results/cppcheck
43-
chmod +x tools/code_checks/run_cppcheck.sh
44-
$(DOCKER) python3 tools/code_checks/codeChecks.py --runCheck check-cppcheck
45+
chmod +x extras/makers-devops/tools/code_checks/run_cppcheck.sh
46+
$(DOCKER) python3 $(CODECHECK) --projectYAML $(PROJECTYAML) --userYAML $(USERYAML) --runCheck check-cppcheck
4547
# firefox _results/cppcheck/check-cppcheck/html-report/index.html
4648

4749
run-container-clang-tidy-check: pull-container
4850
-rm -rf _results/clang-tidy/*
4951
-mkdir -p _results/clang-tidy
50-
chmod +x tools/code_checks/run_clang_tidy.sh
51-
$(DOCKER) python3 tools/code_checks/codeChecks.py --runCheck check-clang-tidy
52+
chmod +x extras/makers-devops/tools/code_checks/run_clang_tidy.sh
53+
$(DOCKER) python3 $(CODECHECK) --projectYAML $(PROJECTYAML) --userYAML $(USERYAML) --runCheck check-clang-tidy
5254

5355
run-container-clang-tidy-check-fix: pull-container
5456
-rm -rf _results/clang-tidy/*
5557
-mkdir -p _results/clang-tidy
56-
chmod +x tools/code_checks/run_clang_tidy.sh
57-
$(DOCKER) python3 tools/code_checks/codeChecks.py --runCheck check-clang-tidy-fix
58+
chmod +x extras/makers-devops/tools/code_checks/run_clang_tidy.sh
59+
$(DOCKER) python3 $(CODECHECK) --projectYAML $(PROJECTYAML) --userYAML $(USERYAML) --runCheck check-clang-tidy-fix
5860

5961
run-container-clang-tidy-format: pull-container
60-
chmod +x tools/code_checks/run_clang_format.sh
61-
$(DOCKER) python3 tools/code_checks/codeChecks.py --runCheck clang-format
62+
chmod +x extras/makers-devops/tools/code_checks/run_clang_format.sh
63+
$(DOCKER) python3 $(CODECHECK) --projectYAML $(PROJECTYAML) --userYAML $(USERYAML) --runCheck clang-format
6264

6365
run-container-black-format:
6466
-rm -rf _results/black/*
6567
-mkdir -p _results/black
66-
chmod +x tools/code_checks/run_black.sh
67-
python3 tools/code_checks/codeChecks.py --runCheck black-format
68+
chmod +x extras/makers-devops/tools/code_checks/run_black.sh
69+
python3 $(CODECHECK) --projectYAML $(PROJECTYAML) --userYAML $(USERYAML) --runCheck black-format
70+
71+
run-container-generate-html-report: pull-container
72+
$(DOCKER) python3 $(MERGEXML) --logDir=$(CLANGTIDY_OUTPUT) --xmlPath=$(CPPCHECK_OUTPUT)/check-cppcheck-errors.xml
73+
$(DOCKER) cppcheck-htmlreport --file=$(CPPCHECK_OUTPUT)/check-cppcheck-errors.xml --title=CPPCheck --report-dir=$(CPPCHECK_OUTPUT)/html-report --source-dir=. 2>&1 | tee -a $(CPPCHECK_OUTPUT)/check-cppcheck.log
6874

6975
##############################################################################################################################################################
7076

71-
# run stuff with container from docker hub
7277
run-build-target:
7378
(cd tests/arduino-core-tests ; make compile FQBN=$(FQBN) $(TARGET))
7479

80+
run-container-interactive: pull-container
81+
$(DOCKER)

config/clang-format/.clang-format

Lines changed: 0 additions & 34 deletions
This file was deleted.

config/clang-tidy/.clang-tidy

Lines changed: 0 additions & 55 deletions
This file was deleted.

config/cppcheck/misra.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

config/cppcheck/misra.txt

Whitespace-only changes.

config/project.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ check:
88
check-clang-tidy:
99
description: clang-tidy check sources
1010
tool: clang-tidy
11-
command: tools/code_checks/run_clang_tidy.sh ./cores/psoc6/* ./libraries/*
11+
command: extras/makers-devops/tools/code_checks/run_clang_tidy.sh ./cores/psoc6/* ./libraries/*
1212

1313
check-cppcheck:
1414
description: cppcheck check sources
1515
tool: cppcheck
16-
command: tools/code_checks/run_cppcheck.sh ./cores/psoc6/* ./libraries/*
16+
command: extras/makers-devops/tools/code_checks/run_cppcheck.sh ./cores/psoc6/* ./libraries/*
1717
| -I extras/arduino-core-api/api/ -I variants/CY8CKIT-062S2-AI/mtb-bsp -I extras/mtb-libs/core-lib/include
1818
| --suppress=*:extras/arduino-core-api/api/* --suppress=*:variants/CY8CKIT-062S2-AI/mtb-bsp/* --suppress=*:extras/mtb-libs/core-lib/include/*
1919

2020
clang-format:
2121
description: clang-tidy check sources
2222
tool: clang-format
23-
command: tools/code_checks/run_clang_format.sh ./cores/psoc6/* ./libraries/*
23+
command: extras/makers-devops/tools/code_checks/run_clang_format.sh ./cores/psoc6/* ./libraries/*
2424

2525
black-format:
2626
description: clang-tidy check sources
2727
tool: black-format
28-
command: tools/code_checks/run_black.sh ./tools/*
28+
command: extras/makers-devops/tools/code_checks/run_black.sh ./extras/makers-devops/tools/*

tools/check_schemata/checkProjectYAMLSchema.py

Lines changed: 0 additions & 38 deletions
This file was deleted.

tools/check_schemata/checkUserYAMLSchema.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

tools/check_schemata/project_yaml_schema.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

tools/check_schemata/user_yaml_schema.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)