aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-07-23 21:19:44 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-07-23 21:19:44 +0000
commit22ac78d1a4cf8e59f2c174579836357c04972aea (patch)
tree3c113a7e7aa8aa960d729780f782d51fecc2d0fe
parentd0b17f294b1590abdd666367922b1ef8025569a5 (diff)
downloadpaludis-22ac78d1a4cf8e59f2c174579836357c04972aea.tar.gz
paludis-22ac78d1a4cf8e59f2c174579836357c04972aea.tar.xz
More verbosity if PALUDIS_VERBOSE_TESTS is set
-rw-r--r--paludis/util/test_extras.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/paludis/util/test_extras.cc b/paludis/util/test_extras.cc
index 2e44477..857b135 100644
--- a/paludis/util/test_extras.cc
+++ b/paludis/util/test_extras.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006 Ciaran McCreesh <ciaranm@ciaranm.org>
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
*
* This file is part of the Paludis package manager. Paludis is free software;
* you can redistribute it and/or modify it under the terms of the GNU General
@@ -49,10 +49,16 @@ namespace
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);
+ if (getenv_with_default("PALUDIS_VERBOSE_TESTS", "").empty())
+ {
+ Log::get_instance()->set_log_stream(&s);
+
+ set_run_command_stderr_fds(dev_null_pid, -1);
+ PStream::set_stderr_fd(dev_null_pid, -1);
+ }
+ else
+ Log::get_instance()->set_log_level(ll_debug);
}
};