[SSSD] [sssd PR#867][synchronized] ci: use python2 version of pytest
URL: https://github.com/SSSD/sssd/pull/867 Author: pbrezina Title: #867: ci: use python2 version of pytest Action: synchronized To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/867/head:pr867 git checkout pr867 From 59454a8012bbe31ff0f1993f3d6f23a4fb4ea099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= Date: Mon, 19 Aug 2019 12:28:30 +0200 Subject: [PATCH 1/2] ci: use python2 version of pytest Fedora 31 changed symlink of /usr/bin/py.test from pytest2 to pytest3. We need to run the python2 version in order to run our tests with python2. --- src/external/intgcheck.m4 | 7 +-- src/tests/intg/Makefile.am | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/external/intgcheck.m4 b/src/external/intgcheck.m4 index c14f66978b..05b3616433 100644 --- a/src/external/intgcheck.m4 +++ b/src/external/intgcheck.m4 @@ -1,7 +1,10 @@ AC_CHECK_PROG([HAVE_FAKEROOT], [fakeroot], [yes], [no]) +dnl Check for pytest binary. When available, we will use py.test-2 for python2 +dnl version. If it is not available we will try to use py.test. AC_PATH_PROG([PYTEST], [py.test]) -AS_IF([test -n "$PYTEST"], [HAVE_PYTEST=yes], [HAVE_PYTEST=no]) +AC_PATH_PROG([PYTEST2], [py.test-2], [$PYTEST]) +AS_IF([test -n "$PYTEST2"], [HAVE_PYTEST2=yes], [HAVE_PYTEST2=no]) dnl Check for variable and fail unless value is "yes" dnl The second argument will be printed in error message in case of error @@ -27,7 +30,7 @@ AC_DEFUN([SSS_ENABLE_INTGCHECK_REQS], [ SSS_INTGCHECK_REQ([HAVE_LDAPMODIFY], [ldapmodify]) SSS_INTGCHECK_REQ([HAVE_FAKEROOT], [fakeroot]) SSS_INTGCHECK_REQ([HAVE_PYTHON2], [python2]) -SSS_INTGCHECK_REQ([HAVE_PYTEST], [pytest]) +SSS_INTGCHECK_REQ([HAVE_PYTEST2], [pytest2]) SSS_INTGCHECK_REQ([HAVE_PY2MOD_LDAP], [python-ldap]) SSS_INTGCHECK_REQ([HAVE_PY2MOD_LDAP], [pyldb]) fi diff --git a/src/tests/intg/Makefile.am b/src/tests/intg/Makefile.am index 2aa1566e35..98ddd5f6e3 100644 --- a/src/tests/intg/Makefile.am +++ b/src/tests/intg/Makefile.am @@ -184,5 +184,5 @@ intgcheck-installed: config.py passwd group pam_sss_service pam_sss_alt_service DBUS_SESSION_BUS_ADDRESS="unix:path=$$DBUS_SOCK_DIR/fake_socket" \ DBUS_SYSTEM_BUS_ADDRESS="unix:path=$$DBUS_SOCK_DIR/system_bus_socket" \ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="$$DBUS_SYSTEM_BUS_ADDRESS" \ - fakeroot $(PYTHON2) $(PYTEST) -v -r a --tb=native $(INTGCHECK_PYTEST_ARGS) . + fakeroot $(PYTHON2) $(PYTEST2) -v -r a --tb=native $(INTGCHECK_PYTEST_ARGS) . rm -f $(DESTDIR)$(logpath)/* From 2dd51249f99cf8b9d671a72e1bc976f02dbc80a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= Date: Tue, 20 Aug 2019 12:00:26 +0200 Subject: [PATCH 2/2] ci: pep8 was renamed to pycodestyle in Fedora 31 --- contrib/ci/deps.sh | 2 +- contrib/ci/run | 8 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/contrib/ci/deps.sh b/contrib/ci/deps.sh index 7570575268..a5816a9b6a 100644 --- a/contrib/ci/deps.sh +++ b/contrib/ci/deps.sh @@ -56,7 +56,7 @@ if [[ "$DISTRO_BRANCH" == -redhat-* ]]; then if [[ "$DISTRO_BRANCH" == -redhat-fedora-3[1-9]* ]]; then DEPS_LIST+=( -python3-pep8 +python3-pycodestyle ) else DEPS_LIST+=( diff --git a/contrib/ci/run b/contrib/ci/run index bf29f87531..488b964408 100755 --- a/contrib/ci/run +++ b/contrib/ci/run @@ -58,6 +58,12 @@ declare BASE_DIR=`pwd` declare MODERATE=false declare RIGOROUS=false +# pep8 was renamed to pycodestyle +declare PEP8_BIN="pep8" +if which pycodestyle &> /dev/null; then + PEP8_BIN="pycodestyle" +fi + # Output program usage information. function usage() { @@ -398,7 +404,7 @@ if [[ "$DISTRO_BRANCH" != redhat-* ]]; then PEP8_IGNORE+=",E722" fi stage pep8 find . -path ./src/config -prune -o \ - -name \*.py -exec pep8 $PEP8_IGNORE {} + + -name \*.py -exec $PEP8_BIN $PEP8_IGNORE {} + stage autoreconfautoreconf --install --force run_build debug build_debug if "$RIGOROUS"; then ___ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org
[SSSD] [sssd PR#867][synchronized] ci: use python2 version of pytest
URL: https://github.com/SSSD/sssd/pull/867 Author: pbrezina Title: #867: ci: use python2 version of pytest Action: synchronized To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/867/head:pr867 git checkout pr867 From 59454a8012bbe31ff0f1993f3d6f23a4fb4ea099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= Date: Mon, 19 Aug 2019 12:28:30 +0200 Subject: [PATCH 1/2] ci: use python2 version of pytest Fedora 31 changed symlink of /usr/bin/py.test from pytest2 to pytest3. We need to run the python2 version in order to run our tests with python2. --- src/external/intgcheck.m4 | 7 +-- src/tests/intg/Makefile.am | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/external/intgcheck.m4 b/src/external/intgcheck.m4 index c14f66978b..05b3616433 100644 --- a/src/external/intgcheck.m4 +++ b/src/external/intgcheck.m4 @@ -1,7 +1,10 @@ AC_CHECK_PROG([HAVE_FAKEROOT], [fakeroot], [yes], [no]) +dnl Check for pytest binary. When available, we will use py.test-2 for python2 +dnl version. If it is not available we will try to use py.test. AC_PATH_PROG([PYTEST], [py.test]) -AS_IF([test -n "$PYTEST"], [HAVE_PYTEST=yes], [HAVE_PYTEST=no]) +AC_PATH_PROG([PYTEST2], [py.test-2], [$PYTEST]) +AS_IF([test -n "$PYTEST2"], [HAVE_PYTEST2=yes], [HAVE_PYTEST2=no]) dnl Check for variable and fail unless value is "yes" dnl The second argument will be printed in error message in case of error @@ -27,7 +30,7 @@ AC_DEFUN([SSS_ENABLE_INTGCHECK_REQS], [ SSS_INTGCHECK_REQ([HAVE_LDAPMODIFY], [ldapmodify]) SSS_INTGCHECK_REQ([HAVE_FAKEROOT], [fakeroot]) SSS_INTGCHECK_REQ([HAVE_PYTHON2], [python2]) -SSS_INTGCHECK_REQ([HAVE_PYTEST], [pytest]) +SSS_INTGCHECK_REQ([HAVE_PYTEST2], [pytest2]) SSS_INTGCHECK_REQ([HAVE_PY2MOD_LDAP], [python-ldap]) SSS_INTGCHECK_REQ([HAVE_PY2MOD_LDAP], [pyldb]) fi diff --git a/src/tests/intg/Makefile.am b/src/tests/intg/Makefile.am index 2aa1566e35..98ddd5f6e3 100644 --- a/src/tests/intg/Makefile.am +++ b/src/tests/intg/Makefile.am @@ -184,5 +184,5 @@ intgcheck-installed: config.py passwd group pam_sss_service pam_sss_alt_service DBUS_SESSION_BUS_ADDRESS="unix:path=$$DBUS_SOCK_DIR/fake_socket" \ DBUS_SYSTEM_BUS_ADDRESS="unix:path=$$DBUS_SOCK_DIR/system_bus_socket" \ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="$$DBUS_SYSTEM_BUS_ADDRESS" \ - fakeroot $(PYTHON2) $(PYTEST) -v -r a --tb=native $(INTGCHECK_PYTEST_ARGS) . + fakeroot $(PYTHON2) $(PYTEST2) -v -r a --tb=native $(INTGCHECK_PYTEST_ARGS) . rm -f $(DESTDIR)$(logpath)/* From f0145b70e0fe585c1361981f83b968b0b833c222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= Date: Tue, 20 Aug 2019 12:00:26 +0200 Subject: [PATCH 2/2] ci: pep8 was renamed to pycodestyle in Fedora 31 --- contrib/ci/deps.sh | 3 ++- contrib/ci/run | 9 - 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/contrib/ci/deps.sh b/contrib/ci/deps.sh index 7570575268..36e84200be 100644 --- a/contrib/ci/deps.sh +++ b/contrib/ci/deps.sh @@ -56,7 +56,8 @@ if [[ "$DISTRO_BRANCH" == -redhat-* ]]; then if [[ "$DISTRO_BRANCH" == -redhat-fedora-3[1-9]* ]]; then DEPS_LIST+=( -python3-pep8 +python2-pycodestyle +python3-pycodestyle ) else DEPS_LIST+=( diff --git a/contrib/ci/run b/contrib/ci/run index bf29f87531..deb30093b0 100755 --- a/contrib/ci/run +++ b/contrib/ci/run @@ -58,6 +58,13 @@ declare BASE_DIR=`pwd` declare MODERATE=false declare RIGOROUS=false +# pep8 was renamed to pycodestyle +declare PEP8_BIN="pep8" +which pycodestyle-2 &> /dev/null +if [ $? -eq 0 ]; then + PEP8_BIN="pycodestyle-2" +fi + # Output program usage information. function usage() { @@ -398,7 +405,7 @@ if [[ "$DISTRO_BRANCH" != redhat-* ]]; then PEP8_IGNORE+=",E722" fi stage pep8 find . -path ./src/config -prune -o \ - -name \*.py -exec pep8 $PEP8_IGNORE {} + + -name \*.py -exec $PEP8_BIN $PEP8_IGNORE {} + stage autoreconfautoreconf --install --force run_build debug build_debug if "$RIGOROUS"; then ___ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org
[SSSD] [sssd PR#867][synchronized] ci: use python2 version of pytest
URL: https://github.com/SSSD/sssd/pull/867 Author: pbrezina Title: #867: ci: use python2 version of pytest Action: synchronized To pull the PR as Git branch: git remote add ghsssd https://github.com/SSSD/sssd git fetch ghsssd pull/867/head:pr867 git checkout pr867 From 59454a8012bbe31ff0f1993f3d6f23a4fb4ea099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= Date: Mon, 19 Aug 2019 12:28:30 +0200 Subject: [PATCH 1/2] ci: use python2 version of pytest Fedora 31 changed symlink of /usr/bin/py.test from pytest2 to pytest3. We need to run the python2 version in order to run our tests with python2. --- src/external/intgcheck.m4 | 7 +-- src/tests/intg/Makefile.am | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/external/intgcheck.m4 b/src/external/intgcheck.m4 index c14f66978b..05b3616433 100644 --- a/src/external/intgcheck.m4 +++ b/src/external/intgcheck.m4 @@ -1,7 +1,10 @@ AC_CHECK_PROG([HAVE_FAKEROOT], [fakeroot], [yes], [no]) +dnl Check for pytest binary. When available, we will use py.test-2 for python2 +dnl version. If it is not available we will try to use py.test. AC_PATH_PROG([PYTEST], [py.test]) -AS_IF([test -n "$PYTEST"], [HAVE_PYTEST=yes], [HAVE_PYTEST=no]) +AC_PATH_PROG([PYTEST2], [py.test-2], [$PYTEST]) +AS_IF([test -n "$PYTEST2"], [HAVE_PYTEST2=yes], [HAVE_PYTEST2=no]) dnl Check for variable and fail unless value is "yes" dnl The second argument will be printed in error message in case of error @@ -27,7 +30,7 @@ AC_DEFUN([SSS_ENABLE_INTGCHECK_REQS], [ SSS_INTGCHECK_REQ([HAVE_LDAPMODIFY], [ldapmodify]) SSS_INTGCHECK_REQ([HAVE_FAKEROOT], [fakeroot]) SSS_INTGCHECK_REQ([HAVE_PYTHON2], [python2]) -SSS_INTGCHECK_REQ([HAVE_PYTEST], [pytest]) +SSS_INTGCHECK_REQ([HAVE_PYTEST2], [pytest2]) SSS_INTGCHECK_REQ([HAVE_PY2MOD_LDAP], [python-ldap]) SSS_INTGCHECK_REQ([HAVE_PY2MOD_LDAP], [pyldb]) fi diff --git a/src/tests/intg/Makefile.am b/src/tests/intg/Makefile.am index 2aa1566e35..98ddd5f6e3 100644 --- a/src/tests/intg/Makefile.am +++ b/src/tests/intg/Makefile.am @@ -184,5 +184,5 @@ intgcheck-installed: config.py passwd group pam_sss_service pam_sss_alt_service DBUS_SESSION_BUS_ADDRESS="unix:path=$$DBUS_SOCK_DIR/fake_socket" \ DBUS_SYSTEM_BUS_ADDRESS="unix:path=$$DBUS_SOCK_DIR/system_bus_socket" \ DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="$$DBUS_SYSTEM_BUS_ADDRESS" \ - fakeroot $(PYTHON2) $(PYTEST) -v -r a --tb=native $(INTGCHECK_PYTEST_ARGS) . + fakeroot $(PYTHON2) $(PYTEST2) -v -r a --tb=native $(INTGCHECK_PYTEST_ARGS) . rm -f $(DESTDIR)$(logpath)/* From 404b3f0267f3db5cfbdf5e8825a5f94329598110 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= Date: Tue, 20 Aug 2019 12:00:26 +0200 Subject: [PATCH 2/2] ci: pep8 was renamed to pycodestyle in Fedora 31 --- contrib/ci/deps.sh | 3 ++- contrib/ci/run | 7 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/ci/deps.sh b/contrib/ci/deps.sh index 7570575268..36e84200be 100644 --- a/contrib/ci/deps.sh +++ b/contrib/ci/deps.sh @@ -56,7 +56,8 @@ if [[ "$DISTRO_BRANCH" == -redhat-* ]]; then if [[ "$DISTRO_BRANCH" == -redhat-fedora-3[1-9]* ]]; then DEPS_LIST+=( -python3-pep8 +python2-pycodestyle +python3-pycodestyle ) else DEPS_LIST+=( diff --git a/contrib/ci/run b/contrib/ci/run index bf29f87531..e5193f80eb 100755 --- a/contrib/ci/run +++ b/contrib/ci/run @@ -58,6 +58,13 @@ declare BASE_DIR=`pwd` declare MODERATE=false declare RIGOROUS=false +# pep8 was renamed to pycodestyle +declare PEP8_BIN="pep8" +which pycodestyle-2 &> /dev/null +if [ $? -eq 0 ]; then + PEP8_BIN="pycodestyle-2" +fi + # Output program usage information. function usage() { ___ sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org