#include <iostream>
#include <boost/test/auto_unit_test.hpp>
-#include <satsolver/solvable.h>
#include "zypp/base/Logger.h"
#include "zypp/TmpPath.h"
#include "zypp/RepoManager.h"
* the final object
*
* so the test covers both satsolver-tools
- * right insertion and parsing
+ * right insertion and parsing
* and libzypp ResObject and friends data
* extraction from solv files
*/
filesystem::TmpDir tmp;
RepoManagerOptions opts = RepoManagerOptions::makeTestSetup(tmp.path());
RepoManager mgr(opts);
-
+
KeyRingTestReceiver keyring_callbacks;
KeyRingTestSignalReceiver receiver;
BOOST_AUTO_TEST_CASE(attributes)
{
init_pool_yum();
- MIL << sat::Pool::instance();
+ MIL << sat::Pool::instance();
Repository r = sat::Pool::instance().reposFind("updates");
-
+
int c = 0;
-
+
for ( Repository::SolvableIterator it = r.solvablesBegin();
it != r.solvablesEnd();
++it )
{
- sat::Solvable s = *it;
+ sat::Solvable s = *it;
//MIL << s.ident() << endl;
if ( s.ident() == "openssl-devel" )
- {
+ {
c++;
Package::Ptr p = asKind<Package>(makeResObject(s));
BOOST_CHECK(p);
-
+
//solvable 5 (6):
//name: openssl-devel 0.9.8d-17.2 i586
BOOST_CHECK_EQUAL(p->name(), "openssl-devel");
BOOST_CHECK_EQUAL(p->vendor(), "SUSE LINUX Products GmbH, Nuernberg, Germany");
//solvable:checksum: 9f6a44015ad97680e9f93d0edefa1d533940479c
BOOST_CHECK_EQUAL(p->checksum(), CheckSum::sha1("9f6a44015ad97680e9f93d0edefa1d533940479c"));
- //solvable:summary:
+ //solvable:summary:
BOOST_CHECK_EQUAL(p->summary(), "Include Files and Libraries mandatory for Development.");
//solvable:description: This package contains all necessary include files and libraries needed
//to develop applications that require these.
//solvable:sourceevr: (void)
//solvable:sourcename: openssl
//solvable:headerend: 34861
-
+
}
}
-
+
// check that we actually found all testeable
// resolvables
BOOST_CHECK_EQUAL(c, 1);
-
-
+
+
}
#include <iostream>
#include <boost/test/auto_unit_test.hpp>
-#include <satsolver/solvable.h>
#include "zypp/base/Logger.h"
#include "zypp/base/Easy.h"
#include "zypp/Pattern.h"
{
MIL << sat::Pool::instance();
Repository r = sat::Pool::instance().reposFind("opensuse");
-
+
int c = 0;
-
+
for ( Repository::SolvableIterator it = r.solvablesBegin();
it != r.solvablesEnd();
++it )
{
- sat::Solvable s = *it;
+ sat::Solvable s = *it;
//MIL << s.ident() << endl;
if ( s.ident() == "pattern:apparmor" )
- {
+ {
c++;
-
+
// solvable 21795 (21796):
// name: pattern:apparmor 11.0-67 i586
// vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
BOOST_CHECK_EQUAL(p->isDefault(), false);
}
if ( s.ident() == "pattern:default" )
- {
+ {
c++;
Pattern::Ptr p = asKind<Pattern>(makeResObject(s));
BOOST_CHECK(p);
BOOST_CHECK_EQUAL(p->userVisible(), false);
}
}
-
+
// check that we actually found all testeable
// resolvables
BOOST_CHECK_EQUAL(c, 2);
-
-
+
+
}