[SSSD] [PATCH] CI: Run integration tests on debian testing
Nikolai Kondrashov
Nikolai.Kondrashov at redhat.com
Tue Sep 29 13:47:28 UTC 2015
On 09/29/2015 03:41 PM, Lukas Slebodnik wrote:
> ehlo,
>
> Integration tests are enabled on debian with the last patch.
So we've got more cwrap packages into Debian? Awesome :)! Or were they there
all the time and I simply failed to notice them?
> I just changed DEPS_INTGCHECK_SATISFIED to true for debian
> because in future we might introduce new dependencies
> which will not be in debian (su_wrapper).
Ah, alright.
> The 1st patch is prequisity for the last patch because
> installation of slapd requires user interaction.
> The ticket #2433 is finally fixed after 13 months.
Thank you, Lukas.
> If we do not want to introduce new dependency /usr/bin/libtool
> for debian then there is alternative solution of bug fixed
> in the 2nd patch. We can run libtool from CWD generated by autotools.
> In both cases it's a oneliner :-)
>
> Here is an alternative version:
>
> diff --git a/contrib/ci/run b/contrib/ci/run
> index 5f668ff..1f64e67 100755
> --- a/contrib/ci/run
> +++ b/contrib/ci/run
> @@ -204,7 +204,7 @@ function build_debug()
> CK_FORK=no \
> stage make-check-valgrind \
> make-check-wrap -j $CPU_NUM check -- \
> - libtool --mode=execute \
> + ./libtool --mode=execute \
> valgrind-condense 99 \
> '!(*.py|*dlopen-tests)' -- \
> --trace-children=yes \
I like this way a little better, but not enough to argue :)
> From 6175bd3f05cbfd5f7d9b26770d9a98012803745c Mon Sep 17 00:00:00 2001
> From: Lukas Slebodnik<lslebodn at redhat.com>
> Date: Tue, 29 Sep 2015 11:52:30 +0200
> Subject: [PATCH 1/3] CI: Don't depend on user input with apt-get
>
> Resolves:
> https://fedorahosted.org/sssd/ticket/2433
> ---
> contrib/ci/README.md | 6 ++++++
> contrib/ci/distro.sh | 2 ++
> 2 files changed, 8 insertions(+)
>
> diff --git a/contrib/ci/README.md b/contrib/ci/README.md
> index 6b5f7f30eac8327d5aa45c3bfefd57e8d3109fe0..075bc3e074cb13916619f46c12c6d1a4de0158a2 100644
> --- a/contrib/ci/README.md
> +++ b/contrib/ci/README.md
> @@ -47,6 +47,12 @@ and Debian-based distros:
>
> Where `<USER>` is the user invoking CI.
>
> +You might also want to allow to keep environment variable DEBIAN_FRONTEND
> +on debian. So script can perform an unattended installation of a Debian package
> +with apt-get.
> + Defaults!/usr/bin/apt-get env_keep += "DEBIAN_FRONTEND
> +
> +
The terminating double quote is missing here. Also, may I suggest simplifying
the text a little? Like this:
You may also want to allow passing DEBIAN_FRONTEND environment variable to
apt-get on Debian, so CI can request non-interactive package installation:
Defaults!/usr/bin/apt-get env_keep += "DEBIAN_FRONTEND"
> On Red Hat distros a repository carrying dependencies missing from some
> distros needs to be added to yum configuration. See instructions on the
> [Copr project page](http://copr-fe.cloud.fedoraproject.org/coprs/lslebodn/sssd-deps/).
> diff --git a/contrib/ci/distro.sh b/contrib/ci/distro.sh
> index 5416bfff325c4e5d0a10ebea67cba26e20e03fd5..095985ccae81e54bcd79607e455a1c9295aad867 100644
> --- a/contrib/ci/distro.sh
> +++ b/contrib/ci/distro.sh
> @@ -30,6 +30,8 @@ if [ -e /etc/redhat-release ]; then
> DISTRO_FAMILY=redhat
> elif [ -e /etc/debian_version ]; then
> DISTRO_FAMILY=debian
> + # Perform an unattended installation of a Debian package with apt-get
> + export DEBIAN_FRONTEND=noninteractive
I think a better way will be to pass DEBIAN_FRONTEND explicitly to sudo
commands and not set it globally. E.g.:
[ $# != 0 ] && DEBIAN_FRONTEND=noninteractive \
sudo -p "$prompt" apt-get --yes install -- "$@"
We might very well need it for everything eventually, but changing global
environment implicitly, as part of loading a module ("distro.sh") violates the
no-surprises rule somewhat, and hurts modularization.
> else
> DISTRO_FAMILY=unknown
> fi
> -- 2.5.0
>
>
> 0002-CI-Add-missing-dependency-for-debian.patch
>
>
> From 3e0ce9c714d5dc11eaf5ff00792eb06d3b98ff90 Mon Sep 17 00:00:00 2001
> From: Lukas Slebodnik<lslebodn at redhat.com>
> Date: Tue, 29 Sep 2015 12:29:51 +0200
> Subject: [PATCH 2/3] CI: Add missing dependency for debian
>
> All test failed due to missing /usr/bin/libtool
>
> e.g.
> /home/build/sssd/build/test-driver: line 107: libtool: command not found
> FAIL test-io (exit status: 127)
Whoa! When did that start happening?
Nick
More information about the sssd-devel
mailing list