ref: refs/heads/master
commit f78e85a1ba3ace4f64b6ae37befc29d7a31a3317
Author: Michael Andres
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@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org