X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=.woodpecker%2Ffunctional_test.yml;h=6eab6a51c58dedfd46c56df4db34588fa3cb2808;hb=35f7574150940bc88eb3192f64c2dbfc650cf3e3;hp=a9ae02a61d504eaa569b0030d13320edafe82306;hpb=74f975ac7909f4c0f8433d12defb6012ab6c9ff5;p=kconfig-hardened-check.git diff --git a/.woodpecker/functional_test.yml b/.woodpecker/functional_test.yml index a9ae02a..6eab6a5 100644 --- a/.woodpecker/functional_test.yml +++ b/.woodpecker/functional_test.yml @@ -1,16 +1,51 @@ # .woodpecker.yml -pipeline: - hello-step: +steps: + installation-test: image: python:3 + pull: true commands: - - echo "Hello, this is the functional test" - build: + - echo "Prepare for the installation..." + - cd .. + - pwd + - ls -la + - python --version + - echo "Install the package via pip..." + - pip --verbose install --no-cache-dir git+https://github.com/a13xp0p0v/kernel-hardening-checker + - echo "Run the installed tool..." + - which kernel-hardening-checker + - kernel-hardening-checker + - echo "Check all configs with the installed tool..." + - sysctl -a > /tmp/sysctls + - CONFIG_DIR=`find /usr/local/lib/ -name config_files` + - KCONFIGS=`find $CONFIG_DIR -type f | grep -e "\.config" -e "\.gz"` + - COUNT=0 + - for C in $KCONFIGS; do COUNT=$(expr $COUNT + 1); echo ">>>>> checking kconfig number $COUNT <<<<<"; kernel-hardening-checker -c $C -l /proc/cmdline -s /tmp/sysctls; done + - echo "Have checked $COUNT kconfigs" + static-typing-checking: image: python:3 + pull: true commands: - - echo "Building..." + - echo "Install the mypy tool..." - python --version - a-test-step: + - pip install --no-cache-dir mypy + - mypy kernel_hardening_checker/ --show-error-context --pretty --no-incremental --check-untyped-defs --disallow-untyped-defs --strict-equality + pylint-checking: image: python:3 + pull: true commands: - - echo "Testing..." - - ./bin/kconfig-hardened-check + - echo "Install the pylint tool..." + - python --version + - pip install --no-cache-dir pylint + - pip install --no-cache-dir setuptools + - pylint --recursive=y kernel_hardening_checker setup.py + functional-test-with-coverage: + image: python:3 + pull: true + commands: + - echo "Install the coverage tool..." + - python --version + - pip install --no-cache-dir coverage + - echo "Run the functional tests and collect the coverage..." + - sh .github/workflows/functional_test.sh + - echo "Show the coverage report..." + - coverage report