Skip to content
Snippets Groups Projects
Vivek Kumar Dutta's avatar
Vivek Dutta authored
Below are the configuration variables used in static analysis tests
 - COMMON_IMAGE: <Docker image to use for test>
 - SOURCE_FOLDER: <Source directory path, default src>
 - SHELL_SRC: <Shell script path for shellcheck, default disabled>
 - FLAWFINDER_OPTIONS: <Options used with flawfinder,
    default "-m 4 --error-level=4">
 - CPPCHECK_OPTIONS: <Options to use with cppcheck,
    default "--suppress=unusedFunction --suppress=unreadVariable">
 - CPD_OPTIONS: <Options to use with CPD check,
    default "--minimum-tokens 200 --language c --exclude ./test/cmocka --files">
 - SHELLCHECK_OPTIONS: <ShellCheck options,
    default "-s dash -e SC2034,SC1091 -S info">
 - COMPILE: <Option to define how to compile,
    if defined compilation test also triggered as a pipeline job>

Variables can be Overridden by module tests
Optional test includes
 - ShellCheck if SHELL_SRC defined
 - CppCheck with threadsafety addon
 - CppCheck with cert addon
ef77d6c2
History

gitlab-ci-pipeline

Shared pipelines for CI. Different types of testing that is done in the CI pipeline:

  • Unit testing is defined as testing individual modules of an application in isolation (without any interaction with dependencies) to verify that the code is doing things right
  • Integration testing is defined as checking if different modules are working fine when combined together as a group
  • 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.