a41068e50e7587af50f79b2862d006dd4f289a42
[kconfig-hardened-check.git] / .woodpecker / functional_test.yml
1 # .woodpecker.yml
2 pipeline:
3   installation-test:
4     image: python:3
5     pull: true
6     commands:
7       - echo "Prepare for the installation..."
8       - cd ..
9       - pwd
10       - ls -la
11       - python --version
12       - echo "Install the package via pip..."
13       - pip --verbose install --no-cache-dir git+https://github.com/a13xp0p0v/kconfig-hardened-check
14       - echo "Run the installed tool..."
15       - which kconfig-hardened-check
16       - kconfig-hardened-check
17       - echo "Check all configs with the installed tool..."
18       - CONFIG_DIR=`find /usr/local/lib/ -name config_files`
19       - KCONFIGS=`find $CONFIG_DIR -type f | grep -e "\.config" -e "\.gz"`
20       - COUNT=0
21       - for C in $KCONFIGS; do COUNT=$(expr $COUNT + 1); echo ">>>>> checking kconfig number $COUNT <<<<<"; kconfig-hardened-check -c $C -l /proc/cmdline; done
22       - echo ">>>>> have checked $COUNT kconfigs <<<<<"
23   functional-test-with-coverage:
24     image: python:3
25     pull: true
26     commands:
27       - echo "Install the coverage tool..."
28       - python --version
29       - pip install --no-cache-dir coverage
30       - echo "Run the functional tests and collect the coverage..."
31       - sh .github/workflows/functional_test.sh
32       - coverage report