diff mbox series

[v2,3/4] utils/checkpackagelib: run unit tests on GitLab CI

Message ID 20220123160847.2653086-3-ricardo.martincoski@gmail.com
State Accepted
Headers show
Series [v2,1/4] utils/checkpackagelib: add unit tests | expand

Commit Message

Ricardo Martincoski Jan. 23, 2022, 4:08 p.m. UTC
... so we can catch regressions on check-package.

Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
Changes v1 -> v2:
  - none

DO NOT APPLY before applying the patch before, generating a new docker
image, uploading it, and updating the image name in the .gitlab-ci.yml
---
 support/misc/gitlab-ci.yml.in          | 4 ++++
 support/scripts/generate-gitlab-ci-yml | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/support/misc/gitlab-ci.yml.in b/support/misc/gitlab-ci.yml.in
index be7951b3d2..47e72c3213 100644
--- a/support/misc/gitlab-ci.yml.in
+++ b/support/misc/gitlab-ci.yml.in
@@ -1,3 +1,7 @@ 
+.check-check-package_base:
+    script:
+        - python3 -m pytest -v utils/checkpackagelib/
+
 .check-DEVELOPERS_base:
     # get-developers should print just "No action specified"; if it prints
     # anything else, it's a parse error.
diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml
index bd79807914..aa43aac019 100755
--- a/support/scripts/generate-gitlab-ci-yml
+++ b/support/scripts/generate-gitlab-ci-yml
@@ -26,7 +26,7 @@  gen_tests() {
     local do_basics do_defconfigs do_runtime do_testpkg
     local defconfigs_ext cfg tst
 
-    basics=( DEVELOPERS flake8 package )
+    basics=( check-package DEVELOPERS flake8 package )
 
     defconfigs=( $(cd configs; LC_ALL=C ls -1 *_defconfig) )