From: Aleš Mrázek Date: Mon, 16 Sep 2024 16:28:49 +0000 (+0200) Subject: scripts/poe-tasks: ./configure not required for some tasks X-Git-Tag: v6.0.9~9^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83e23309a1c8070294b482b168d00cfa8f386b75;p=thirdparty%2Fknot-resolver.git scripts/poe-tasks: ./configure not required for some tasks --- diff --git a/.gitlab-ci.manager.yml b/.gitlab-ci.manager.yml index 5ba0d40c7..727e1bf1b 100644 --- a/.gitlab-ci.manager.yml +++ b/.gitlab-ci.manager.yml @@ -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" diff --git a/pyproject.toml b/pyproject.toml index 35e12da5c..780ba1768 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" } diff --git a/scripts/poe-tasks/check b/scripts/poe-tasks/check index 2bf380b93..d7766c200 100755 --- a/scripts/poe-tasks/check +++ b/scripts/poe-tasks/check @@ -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 diff --git a/scripts/poe-tasks/examples b/scripts/poe-tasks/examples index 8a211badd..d4437203d 100755 --- a/scripts/poe-tasks/examples +++ b/scripts/poe-tasks/examples @@ -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 index 62092de01..000000000 --- a/scripts/poe-tasks/man +++ /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* diff --git a/scripts/poe-tasks/test b/scripts/poe-tasks/test index 2afad2a0a..85fd6089a 100755 --- a/scripts/poe-tasks/test +++ b/scripts/poe-tasks/test @@ -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