Mailinglist Archive: zypp-commit (171 mails)

< Previous Next >
[zypp-commit] <libzypp> master : Add test for directories containing testcase or testsetup.
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Thu, 18 Jun 2009 14:08:01 +0200
  • Message-id: <E1MHGQv-0007Q3-Kk@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit f78e85a1ba3ace4f64b6ae37befc29d7a31a3317
Author: Michael Andres <ma@xxxxxxx>
Date: Thu Jun 18 14:08:01 2009 +0200

Add test for directories containing testcase or testsetup.
---
tests/lib/TestSetup.h | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/tests/lib/TestSetup.h b/tests/lib/TestSetup.h
index 2839db4..b371712 100644
--- a/tests/lib/TestSetup.h
+++ b/tests/lib/TestSetup.h
@@ -93,6 +93,19 @@ class TestSetup
{ USR << (_tmprootdir.path() == _rootdir ? "DELETE" : "KEEP") << "
TESTSETUP below " << _rootdir << endl; }

public:
+ /** Whether directory \a path_r contains a solver testcase. */
+ static bool isTestcase( const Pathname & path_r )
+ {
+ return filesystem::PathInfo( path_r / "solver-test.xml" ).isFile();
+ }
+
+ /** Whether directory \a path_r contains a testsetup. */
+ static bool isTestSetup( const Pathname & path_r )
+ {
+ return filesystem::PathInfo( path_r / "repos.d" ).isDir() &&
filesystem::PathInfo( path_r / "raw" ).isDir();
+ }
+
+ public:
const Pathname & root() const { return _rootdir; }

Target & target() { if ( ! getZYpp()->getTarget() )
getZYpp()->initializeTarget( _rootdir ); return *getZYpp()->getTarget(); }
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages