Azure / GitLab / Travis: Add Kconfig unit tests to a job
authorTom Rini <trini@konsulko.com>
Wed, 11 Mar 2020 22:11:15 +0000 (18:11 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 16 Mar 2020 22:54:18 +0000 (18:54 -0400)
The Kconfig language provides a unit test that can be run.  As these
require pytest to be installed and run very quickly, bundle them in to
an existing CI job.

Signed-off-by: Tom Rini <trini@konsulko.com>
.azure-pipelines.yml
.gitlab-ci.yml
.travis.yml

index f66d58aa76f9f3dce0006d3e0957b490df5ba9c9..01b6eda359b6446855cf00d3580c039e69a79945 100644 (file)
@@ -120,7 +120,7 @@ jobs:
           make tools-only_config envtools -j$(nproc)
 
   - job: utils
-    displayName: 'Run binman, buildman, dtoc and patman testsuites'
+    displayName: 'Run binman, buildman, dtoc, Kconfig and patman testsuites'
     pool:
       vmImage: $(ubuntu_vm)
     steps:
@@ -135,7 +135,7 @@ jobs:
           export USER=azure
           virtualenv -p /usr/bin/python3 /tmp/venv
           . /tmp/venv/bin/activate
-          pip install pyelftools
+          pip install pyelftools pytest
           export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl
           export PYTHONPATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt
           export PATH=${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}
@@ -144,6 +144,7 @@ jobs:
           ./tools/buildman/buildman -t
           ./tools/dtoc/dtoc -t
           ./tools/patman/patman --test
+          make O=${UBOOT_TRAVIS_BUILD_DIR} testconfig
           EOF
           cat build.sh
           # We cannot use "container" like other jobs above, as buildman
index 55943bb3a245f09738cb0bb149895aa078d623fa..f43b3c26ef81380246ddd9cf4864d076d4d37dce 100644 (file)
@@ -157,7 +157,7 @@ Build envtools:
   script:
     - make tools-only_config envtools -j$(nproc)
 
-Run binman, buildman, dtoc and patman testsuites:
+Run binman, buildman, dtoc, Kconfig and patman testsuites:
   tags: [ 'all' ]
   stage: testsuites
   script:
@@ -166,7 +166,7 @@ Run binman, buildman, dtoc and patman testsuites:
       export USER=gitlab;
       virtualenv -p /usr/bin/python3 /tmp/venv;
       . /tmp/venv/bin/activate;
-      pip install pyelftools;
+      pip install pyelftools pytest;
       export UBOOT_TRAVIS_BUILD_DIR=/tmp/.bm-work/sandbox_spl;
       export PYTHONPATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc/pylibfdt";
       export PATH="${UBOOT_TRAVIS_BUILD_DIR}/scripts/dtc:${PATH}";
@@ -174,7 +174,8 @@ Run binman, buildman, dtoc and patman testsuites:
       ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test;
       ./tools/buildman/buildman -t;
       ./tools/dtoc/dtoc -t;
-      ./tools/patman/patman --test
+      ./tools/patman/patman --test;
+      make testconfig
 
 # Test sandbox with test.py
 sandbox test.py:
index c59bd7790b6693890e2f87183ead5e491624f8ac..1914f98dfaa349e7cfb94170d95c70fd279486e4 100644 (file)
@@ -152,7 +152,8 @@ script:
        ./tools/binman/binman --toolpath ${UBOOT_TRAVIS_BUILD_DIR}/tools test &&
        ./tools/patman/patman --test &&
        ./tools/buildman/buildman -t &&
-       ./tools/dtoc/dtoc -t;
+       ./tools/dtoc/dtoc -t &&
+       make testconfig;
      fi;
    fi