string msg = str::form(
_("'%s' not found in package names. Trying '%s'."),
arg.c_str(), parsedcap.asString().c_str());
- zypper.out().info(msg,Out::HIGH);
+ zypper.out().info(msg,Out::HIGH); // TODO this should not be called here
DBG << "'" << arg << "' not found, trying '" << parsedcap << "'" << endl;
}
// setters & getters
Out & out();
+ void setOutputWriter(Out * out) { _out_ptr = out; }
Config & config() { return _config; }
const GlobalOptions & globalOpts() const { return _gopts; }
GlobalOptions & globalOptsNoConst() { return _gopts; }
# ma@: disabled subdirs and tests as thay fail on hudson
-#ADD_SUBDIRECTORY(lib)
+ADD_SUBDIRECTORY(lib)
ENABLE_TESTING()
INCLUDE_DIRECTORIES( ${ZYPPER_SOURCE_DIR}/tests/lib )
ADD_DEFINITIONS( -DTESTS_SRC_DIR="${CMAKE_CURRENT_SOURCE_DIR}" -DTESTS_BUILD_DIR="${CMAKE_CURRENT_BINARY_DIR}" )
-#ADD_SUBDIRECTORY( utils )
+ADD_SUBDIRECTORY( utils )
ADD_CUSTOM_TARGET( ctest
COMMAND ctest -a
)
-#ADD_TESTS( PackageArgs )
-#ADD_TESTS( SolverRequester )
+ADD_TESTS( PackageArgs )
+ADD_TESTS( SolverRequester )
BOOST_CHECK_EQUAL(sr.toInstall().size(), 1);
BOOST_CHECK(hasPoolItem(sr.toInstall(), "cron", Edition("4.1-194.33.1"), Arch_x86_64));
BOOST_CHECK(sr.hasFeedback(SolverRequester::Feedback::UPD_CANDIDATE_HAS_LOWER_PRIO));
- BOOST_CHECK(sr.hasFeedback(SolverRequester::Feedback::UPD_CANDIDATE_CHANGES_VENDOR));
}
// request : install cron-4.1-195.0.x86_64
rawargs.push_back("patch:libxml2-434");
SolverRequester sr;
//zypp::getZYpp()->resolver()->createSolverTestcase(TESTS_BUILD_DIR "/testcase");
+
sr.install(rawargs);
BOOST_CHECK(!sr.hasFeedback(SolverRequester::Feedback::SET_TO_INSTALL));
#include "zypp/ResPool.h"
#include "Zypper.h"
+#include "output/OutNormal.h"
using std::cin;
using std::cout;
filesystem::clean_dir( _rootdir );
}
+ // set up the Zypper instance
Zypper & zypper = *Zypper::instance();
zypper.globalOptsNoConst().root_dir = _rootdir.asString();
zypper.globalOptsNoConst().rm_options = zypp::RepoManagerOptions(_rootdir.asString());
zypper.globalOptsNoConst().rm_options.knownReposPath = _rootdir / "repos.d";
-
+ zypper.setOutputWriter(new OutNormal(Out::DEBUG));
if ( ! sysarch_r.empty() )
ZConfig::instance().setSystemArchitecture( sysarch_r );