aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-05-03 15:59:42 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-05-03 15:59:42 +0000
commitf3593eb9fddcb3fa1d60e4676239641c6767e99f (patch)
tree96d8643227700145cadd2e8645eaecf39ab833c4 /test
parent3ebfc4547f21e5fe16986f1c6335fa4343e9a757 (diff)
downloadpaludis-f3593eb9fddcb3fa1d60e4676239641c6767e99f.tar.gz
paludis-f3593eb9fddcb3fa1d60e4676239641c6767e99f.tar.xz
Don't try to run tests that launch sandbox if sandbox is already active
Diffstat (limited to 'test')
-rw-r--r--test/test_framework.cc6
-rw-r--r--test/test_framework.hh8
2 files changed, 14 insertions, 0 deletions
diff --git a/test/test_framework.cc b/test/test_framework.cc
index d6545f3..06d5733 100644
--- a/test/test_framework.cc
+++ b/test/test_framework.cc
@@ -200,6 +200,12 @@ RunTest::operator() (TestCase * test_case) const
for (int repeat = 0 ; repeat < 2 ; ++repeat)
{
+ if (test_case->skip())
+ {
+ std::cout << "(skip)" << std::endl;
+ break;
+ }
+
if (0 != repeat)
std::cout << " (repeat): " << std::flush;
diff --git a/test/test_framework.hh b/test/test_framework.hh
index 2478a22..33aa95f 100644
--- a/test/test_framework.hh
+++ b/test/test_framework.hh
@@ -117,6 +117,14 @@ namespace test
}
/**
+ * Should we be skipped?
+ */
+ virtual bool skip() const
+ {
+ return false;
+ }
+
+ /**
* After how many seconds should we timeout?
*/
virtual unsigned max_run_time() const