Drop an obsolete error handling test
[kconfig-hardened-check.git] / .woodpecker / functional_test.yml
index a9ae02a61d504eaa569b0030d13320edafe82306..7f703281c12ecf1246d373bac1e8d74718ccbbbf 100644 (file)
@@ -1,16 +1,33 @@
 # .woodpecker.yml
 pipeline:
-  hello-step:
+  installation-test:
     image: python:3
+    pull: true
     commands:
-      - echo "Hello, this is the functional test"
-  build:
-    image: python:3
-    commands:
-      - echo "Building..."
+      - echo "Prepare for the installation..."
+      - cd ..
+      - pwd
+      - ls -la
       - python --version
-  a-test-step:
+      - echo "Install the package via pip..."
+      - pip --verbose install --no-cache-dir git+https://github.com/a13xp0p0v/kconfig-hardened-check
+      - echo "Run the installed tool..."
+      - which kconfig-hardened-check
+      - kconfig-hardened-check
+      - echo "Check all configs with the installed tool..."
+      - 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 <<<<<"; kconfig-hardened-check -c $C -l /proc/cmdline; done
+      - echo "Have checked $COUNT kconfigs"
+  functional-test-with-coverage:
     image: python:3
+    pull: true
     commands:
-      - echo "Testing..."
-      - ./bin/kconfig-hardened-check
+      - 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