aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-08-24 23:57:52 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-08-24 23:57:52 +0000
commitef3ca936eb126b67a6678c096bd4900ebeca89d6 (patch)
tree5fc258e3b3c6b0e75219eae2305079ba2b86a758
parent9fde8b77f228890f857bc1acfea73247af0b1447 (diff)
downloadpaludis-ef3ca936eb126b67a6678c096bd4900ebeca89d6.tar.gz
paludis-ef3ca936eb126b67a6678c096bd4900ebeca89d6.tar.xz
Eliminate some of the noise made by tests that intentionally fail (duff ebuilds etc)
-rw-r--r--paludis/util/test_extras.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/paludis/util/test_extras.cc b/paludis/util/test_extras.cc
index 1e6b5bf..e90c35e 100644
--- a/paludis/util/test_extras.cc
+++ b/paludis/util/test_extras.cc
@@ -22,7 +22,10 @@
#include <paludis/util/exception.hh>
#include <paludis/util/log.hh>
#include <paludis/util/stringify.hh>
+#include <paludis/util/system.hh>
+#include <paludis/util/pstream.hh>
#include <sstream>
+#include <fcntl.h>
#include <test/test_framework.hh>
/** \file
@@ -41,11 +44,16 @@ namespace
struct C
{
std::stringstream s;
+ int dev_null_pid;
- C()
+ C() :
+ dev_null_pid(open("/dev/stderr", O_RDONLY))
{
test::set_exception_to_debug_string(&verbose_exception_to_debug_string);
Log::get_instance()->set_log_stream(&s);
+
+ set_run_command_stderr_fds(dev_null_pid, -1);
+ PStream::set_stderr_fd(dev_null_pid, -1);
}
};