]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
scripts/poe-tasks: ./configure not required for some tasks
authorAleš Mrázek <ales.mrazek@nic.cz>
Mon, 16 Sep 2024 16:28:49 +0000 (18:28 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Mon, 30 Sep 2024 09:16:07 +0000 (11:16 +0200)
.gitlab-ci.manager.yml
pyproject.toml
scripts/poe-tasks/check
scripts/poe-tasks/examples
scripts/poe-tasks/man [deleted file]
scripts/poe-tasks/test

index 5ba0d40c72d68bcc72c5659d13ac9860ba968baf..727e1bf1b4f63f1fb234613981e0d05082cd0807 100644 (file)
@@ -6,8 +6,6 @@ default:
   before_script:
     - poetry --version
     - poetry env use $PYTHON_INTERPRETER
-    - poetry install -E prometheus
-    - poe configure
   tags:
     - docker
     - linux
@@ -16,6 +14,7 @@ default:
 examples:py3.12:
   stage: check
   script:
+    - poetry install --only main,dev
     - poe examples
   variables:
     PYTHON_INTERPRETER: python3.12
@@ -23,6 +22,7 @@ examples:py3.12:
 lint:py3.12:
   stage: check
   script:
+    - poetry install --only main,dev,lint
     - poe check
   variables:
     PYTHON_INTERPRETER: python3.12
@@ -30,8 +30,7 @@ lint:py3.12:
 .unit: &unit
   stage: check
   script:
-    # create required directories that are in default config, otherwise unit tests fail
-    - mkdir -p /var/cache/knot-resolver
+    - poetry install --only main,dev,test
     - poe test
     # the following command makes sure that the source root of the coverage file is at $gitroot
     - poetry run bash -c "coverage combine .coverage; coverage xml"
index 35e12da5ca3e905230062ef86cdfc043e124fb89..780ba176899cd2efa28a183e7bdf44d3b0c92552 100644 (file)
@@ -79,7 +79,6 @@ doc-schema = { cmd = "scripts/poe-tasks/doc-schema", help = "Generate a JSON sch
 test = { cmd = "scripts/poe-tasks/test", help = "Run pytest unit tests" }
 check = { cmd = "scripts/poe-tasks/check", help = "Check that all dependencies are installed and run static code analysis" }
 examples = { cmd = "scripts/poe-tasks/examples", help = "Validate all configuration examples using 'kresctl validate' utility" }
-man = {cmd = "scripts/poe-tasks/man", help = "Display Knot Resolver manpage from sources" }
 gen-setuppy = { cmd = "scripts/poe-tasks/gen-setuppy", help = "Generate 'setup.py' file for backwards compatibility" }
 format = { cmd = "scripts/poe-tasks/format", help = "Run code formatter" }
 kresctl = { cmd = "scripts/poe-tasks/kresctl", help="Run kresctl utility" }
index 2bf380b9312dbed786a969984d584cbf9dad5a43..d7766c200f8ec02594e8f90051fc41b61e8a2589 100755 (executable)
@@ -14,8 +14,6 @@ function check_rv {
        aggregate_rv=$(( $aggregate_rv + $1 ))
 }
 
-is_buil_dir_configured
-
 # stop failing early, because we wouldn't do anything else than fail
 set +e
 
@@ -84,6 +82,7 @@ else
        echo -e "${red}These commands might help you:${reset}"
        echo -e "${red}\tpoe format${reset}"
        echo -e "${red}\tpoe gen-setuppy${reset}"
+       echo -e "${red}\tpoe doc-schema${reset}"
        echo -e "${red}That's not great. Could you please fix that?${reset} 😲😟"
 fi
 
index 8a211baddd9d2a3e214fd5bcb6de4e29aa09bc38..d4437203d1fabb9876a6b739e4c09edd43e56f1f 100755 (executable)
@@ -4,8 +4,6 @@
 src_dir="$(dirname "$(realpath "$0")")"
 source $src_dir/utils/_env.sh
 
-is_buil_dir_configured
-
 # validate all configuration examples
 for example in $PWD/etc/config/config.example.*.yaml;
 do
diff --git a/scripts/poe-tasks/man b/scripts/poe-tasks/man
deleted file mode 100755 (executable)
index 62092de..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/usr/bin/env bash
-
-# ensure consistent behaviour
-src_dir="$(dirname "$(realpath "$0")")"
-source $src_dir/utils/_env.sh
-
-meson_setup_configure
-
-ninja_install
-
-man -l .install/share/man/man8/$1*
index 2afad2a0a6994fa924e2d0bf029085845d958e85..85fd6089a79a95ab65ac73024719dd0e08e5174c 100755 (executable)
@@ -4,7 +4,5 @@
 src_dir="$(dirname "$(realpath "$0")")"
 source $src_dir/utils/_env.sh
 
-is_buil_dir_configured
-
 # run pytest
 env PYTHONPATH=. pytest --junitxml=unit.junit.xml --cov=python/knot_resolver --show-capture=all tests/manager