Skip to content
Snippets Groups Projects

Added more optional tests in static analysis stage

Closed Vivek Dutta requested to merge more_test into devel
2 files
+ 44
14
Compare changes
  • Side-by-side
  • Inline
Files
2
  • b24a86e0
    - 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 "-e SC2039,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
      - Flawfinder with level 3
    - Compilation test only gets triggered if COMPILE variable is set
@@ -18,6 +18,7 @@ RUN \
automake \
build-essential \
clang-format \
clang \
cmake \
curl \
gdb \
@@ -38,6 +39,7 @@ RUN \
python3 \
python3-setuptools \
default-jre \
shellcheck \
flawfinder
# Install dependent libraries
RUN \
@@ -221,8 +223,11 @@ RUN \
#install cpd
WORKDIR /home/user
RUN \
wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F6.19.0/pmd-bin-6.19.0.zip && \
unzip pmd-bin-6.19.0.zip
cd /opt/dev && \
wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F6.42.0/pmd-bin-6.42.0.zip && \
unzip pmd-bin-6.42.0.zip &&\
mv pmd-bin-6.42.0 /usr/local/pmd
# microxml
RUN \
Loading