Skip to content

Commit

Permalink
Merge pull request #4917 from jkonecny12/master-enable-pylint-as-opti…
Browse files Browse the repository at this point in the history
…onal

Add possibility to run pylint-only test
  • Loading branch information
jkonecny12 authored Jul 14, 2023
2 parents 4787fd5 + 8e48ea5 commit 2192fff
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,9 @@ container-shell:
--cap-add=SYS_CHROOT \
$(CI_NAME):$(CI_TAG)

container-pylint-only:
$(MAKE) -f ./Makefile.am container-ci CI_CMD="make tests-pylint"

container-rpm-test:
$(CONTAINER_ENGINE) run \
$(CONTAINER_TEST_ARGS) \
Expand Down Expand Up @@ -414,7 +417,10 @@ tests-pep8:

tests-pylint:
$(MAKE)
$(MAKE) TMPDIR=/var/tmp TEST_SUITE_LOG=test-suite.log TESTS=pylint/runpylint.py check
# For a weird reason when pylint is not in TESTS included for automake (during configure)
# it won't allow us to use makefile check to start the tests.
# Unfortunately, we removed pylint from the TESTS because we don't want it to run as default
$(srcdir)/tests/pylint/runpylint | tee $(srcdir)/tests/pylint/runpylint.log

tests-unit-only:
@mkdir -p $(USER_SITE_PACKAGES)
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dist_check_SCRIPTS = \
$(srcdir)/lib/*.py \
unit_tests/unit_tests.sh \
rpm_tests/rpm_tests.sh \
pylint/runpylint.py \
pylint/runpylint \
cppcheck/runcppcheck.sh \
testenv.sh \
$(srcdir)/gettext_tests/*.py \
Expand Down
9 changes: 9 additions & 0 deletions tests/pylint/runpylint
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

# If $top_srcdir has not been set by automake, import the test environment
if [ -z "$top_srcdir" ]; then
top_srcdir="$(realpath "$(dirname "$0")/../..")"
. "${top_srcdir}/tests/testenv.sh"
fi

exec "${top_srcdir}"/tests/pylint/runpylint.py

0 comments on commit 2192fff

Please sign in to comment.