Add a check to `_open`
[kconfig-hardened-check.git] / .woodpecker / functional_test.yml
1 # .woodpecker.yml
2 steps:
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/kernel-hardening-checker
14       - echo "Run the installed tool..."
15       - which kernel-hardening-checker
16       - kernel-hardening-checker
17       - echo "Check all configs with the installed tool..."
18       - sysctl -a > /tmp/sysctls
19       - CONFIG_DIR=`find /usr/local/lib/ -name config_files`
20       - KCONFIGS=`find $CONFIG_DIR -type f | grep -e "\.config" -e "\.gz"`
21       - COUNT=0
22       - 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
23       - echo "Have checked $COUNT kconfigs"
24   functional-test-with-coverage:
25     image: python:3
26     pull: true
27     commands:
28       - echo "Install the coverage tool..."
29       - python --version
30       - pip install --no-cache-dir coverage
31       - echo "Run the functional tests and collect the coverage..."
32       - sh .github/workflows/functional_test.sh
33       - echo "Show the coverage report..."
34       - coverage report