Mailinglist Archive: zypp-devel (53 mails)
| < Previous | Next > |
[zypp-devel] Some changes related to writing zypp test cases.
- From: Michael Andres <ma@xxxxxxx>
- Date: Wed, 1 Oct 2008 18:24:56 +0200
- Message-id: <200810011824.56372.ma@xxxxxxx>
Hi!.
Some changes related to writing zypp test cases.
zypp-trunk rev. 11223:
- added tests/data/openSUSE-11.1 containing raw susetags metadata.
Keeping .solv files in svn is somewhat inconvenient, as you must rebuild them
if something in satsolver changes.
- added tests/include as location for includes that might be used in multiple
testcases.
- added tests/include/TestSetup.h to ease building a test environment below
some tempdir. Currently supports easy setup of Target, RepoManager and
loading data (raw metadata and .solv files) into the pool.
That's how it currently looks like:
#include "TestSetup.h"
BOOST_AUTO_TEST_CASE(WhatProvides)
{
TestSetup test( Arch_x86_64 ); // use x86_64 as system arch
test.loadTarget(); // initialize and load target
test.loadRepo( TESTS_SRC_DIR"/data/openSUSE-11.1" );
This is all you need to setup Target, RepoManager below some temp directory
and load the raw metadata into the pool.
In case you want to setup the system below some fix directory, use:
TestSetup test( "/tmp/mydir", Arch_x86_64 );
You directory is used as it is and not removed at the end.
Feel free to add whatever helps you writing testcases.
--
cu,
Michael Andres
+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres YaST Development ma@xxxxxxxxxx
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0
+------------------------------------------------------------------+
--
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx
| < Previous | Next > |