[zypp-commit] r9434 - in /trunk/libzypp-testsuite/solver: ./ data.deptestomatic/patch/ src/
Author: schubi2
Date: Mon Apr 7 17:49:41 2008
New Revision: 9434
URL: http://svn.opensuse.org/viewcvs/zypp?rev=9434&view=rev
Log:
added testcase for isSatisfied
Added:
trunk/libzypp-testsuite/solver/data.deptestomatic/patch/
trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-135820016-package.xml.gz (with props)
trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-135979280-package.xml.gz (with props)
trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-135979512-package.xml.gz (with props)
trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-135979712-package.xml.gz (with props)
trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-system.xml.gz (with props)
trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-test.xml
Modified:
trunk/libzypp-testsuite/solver/deptestomatic.howto
trunk/libzypp-testsuite/solver/src/deptestomatic.cc
Added: trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-135820016-package.xml.gz
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-135820016-package.xml.gz?rev=9434&view=auto
==============================================================================
Binary file - no diff available.
Added: trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-135979280-package.xml.gz
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-135979280-package.xml.gz?rev=9434&view=auto
==============================================================================
Binary file - no diff available.
Added: trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-135979512-package.xml.gz
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-135979512-package.xml.gz?rev=9434&view=auto
==============================================================================
Binary file - no diff available.
Added: trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-135979712-package.xml.gz
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-135979712-package.xml.gz?rev=9434&view=auto
==============================================================================
Binary file - no diff available.
Added: trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-system.xml.gz
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-system.xml.gz?rev=9434&view=auto
==============================================================================
Binary file - no diff available.
Added: trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-test.xml
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-test.xml?rev=9434&view=auto
==============================================================================
--- trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-test.xml (added)
+++ trunk/libzypp-testsuite/solver/data.deptestomatic/patch/patch-test.xml Mon Apr 7 17:49:41 2008
@@ -0,0 +1,43 @@
+<?xml version="1.0"?>
+<!-- testcase generated by YaST for checking patches-->
+<test>
+<setup arch="i686">
+ <system file="patch-system.xml.gz"/>
+
+ <!--
+ - alias : tools
+ - url : http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_10.3/
+ - path :
+ - type : rpm-md
+ -->
+ <channel file="patch-135820016-package.xml.gz" name="tools" />
+
+ <!--
+ - alias : patch
+ - url : http://download.opensuse.org/
+ - path :
+ - type : rpm-md
+ -->
+ <channel file="patch-135979280-package.xml.gz" name="patch" />
+
+ <!--
+ - alias : 10.3
+ - url : http://download.nvidia.com/opensuse/10.3
+ - path : /
+ - type : rpm-md
+ -->
+ <channel file="patch-135979512-package.xml.gz" name="10.3" />
+
+ <!--
+ - alias : openSUSE-10.3-retail 10.3
+ - url : ftp://10.10.0.100/install/SLP/openSUSE-10.3-GM-DVD9/i386/DVD1
+ - path : /
+ - type : yast2
+ -->
+ <channel file="patch-135979712-package.xml.gz" name="openSUSE-10.3-retail 10.3" />
+</setup>
+<trial>
+<isSatisfied channel="patch" kind="patch" name="rpm-2186-0"/>
+<isSatisfied kind="patch"/>
+</trial>
+</test>
Modified: trunk/libzypp-testsuite/solver/deptestomatic.howto
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/deptestomatic.howto?rev=9434&r1=9433&r2=9434&view=diff
==============================================================================
--- trunk/libzypp-testsuite/solver/deptestomatic.howto (original)
+++ trunk/libzypp-testsuite/solver/deptestomatic.howto Mon Apr 7 17:49:41 2008
@@ -68,11 +68,7 @@
<upgrade/> <!-- Upgrades the System -->
- <distupgrade delete_unmaintained="..."/> <!-- Distribution-Upgrade. delete_unmaintained: false: unmaintained packages will not be deleted -->
-
- <establish freshen="..."/> <!-- Establish state of 'higher level' Resolvables in Pool. freshen: !empty >> like the following freshen-option -->
-
- <freshen/> <!-- go through all package 'freshen' dependencies and schedule matches for installation -->
+ <distupgrade/> <!-- Distribution-Upgrade. -->
<instorder/> <!-- calculates the installation order -->
@@ -103,6 +99,10 @@
<keep channel="..." name="..." kind="..."/> <!-- locks the package from channel -->
+ <isSatisfied channel="..." name="..." kind="..."/> <!-- check ONE resolvable if it is satisfied -->
+
+ <isSatisfied kind="..."/> <!-- check all resolvables of a specific kind if it is satisfied -->
+
<availablelocales/> <!-- lists the available locales -->
<transact name="..." package="..." kind="..." channel="..."/> <!-- if channel is not set package will be removed from system else package will be installed -->
Modified: trunk/libzypp-testsuite/solver/src/deptestomatic.cc
URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp-testsuite/solver/src/deptestomatic.cc?rev=9434&r1=9433&r2=9434&view=diff
==============================================================================
--- trunk/libzypp-testsuite/solver/src/deptestomatic.cc (original)
+++ trunk/libzypp-testsuite/solver/src/deptestomatic.cc Mon Apr 7 17:49:41 2008
@@ -353,6 +353,46 @@
return;
}
+
+//---------------------------------------------------------------------------------------------------------------------
+
+struct IsStatisfied : public resfilter::ResObjectFilterFunctor
+{
+ Resolvable::Kind kind;
+
+ IsStatisfied (Resolvable::Kind k)
+ : kind (k)
+ {
+ }
+
+ bool operator()( PoolItem p)
+ {
+ if (p.isSatisfied())
+ RESULT << p << " IS SATISFIED" << endl;
+ else
+ RESULT << p << " IS NOT SATISFIED" << endl;
+ return true;
+ }
+};
+
+
+void isSatisfied (const string & kind_name) {
+ if (kind_name.empty()) {
+ IsStatisfied info (ResTraitszypp::Package::kind);
+ invokeOnEach( God->pool().begin( ),
+ God->pool().end ( ),
+ functor::functorRef
participants (1)
-
schubi2@svn.opensuse.org