[pacman-dev] [PATCH 3/5] Tests: '-S repo/group' syntax

Dan McGee dpmcgee at gmail.com
Mon Sep 27 11:35:38 EDT 2010


On Sat, Sep 25, 2010 at 4:40 AM, Jakob Gruber <jakob.gruber at gmail.com> wrote:
> when calling '-S repo/group', only group members in <repo> should should
> be installed (group members in other repos are ignored)
>
> Signed-off-by: Jakob Gruber <jakob.gruber at gmail.com>
> ---
>  test/pacman/tests/sync024.py |   23 +++++++++++++++++++++++
I wonder if we should move some of these group-related tests to groupXXX.py.

Looks good; just the same note as the other test regarding the
expectfailure thing.

>  1 files changed, 23 insertions(+), 0 deletions(-)
>  create mode 100644 test/pacman/tests/sync024.py
>
> diff --git a/test/pacman/tests/sync024.py b/test/pacman/tests/sync024.py
> new file mode 100644
> index 0000000..6d1192f
> --- /dev/null
> +++ b/test/pacman/tests/sync024.py
> @@ -0,0 +1,23 @@
> +self.description = "Install a group from a sync db repo/group syntax"
> +
> +sp1 = pmpkg("pkg1")
> +sp2 = pmpkg("pkg2")
> +sp3 = pmpkg("pkg3")
> +newp1 = pmpkg("pkg1", "1.2-1")
> +
> +for p in sp1, sp2, sp3, newp1:
> +       setattr(p, "groups", ["grp"])
> +
> +self.addpkg2db("testing", newp1);
> +
> +for p in sp1, sp2, sp3:
> +       self.addpkg2db("sync", p);
> +
> +self.args = "-S testing/grp"
> +
> +self.addrule("PACMAN_RETCODE=0")
> +for p in sp2, sp3:
> +       self.addrule("!PKG_EXIST=%s" % p.name)
> +self.addrule("PKG_EXIST=%s" % newp1.name)
> +# The newer version should still be installed
> +self.addrule("PKG_VERSION=pkg1|1.2-1")
I believe PKG_VERSION will cover the EXIST check too, but not a big deal.

> --
> 1.7.3
>
>
>


More information about the pacman-dev mailing list