[chirp_devel] [PATCH 01/17] Use logging in run_tests (#2347)
Zachary T Welch
Wed Mar 4 21:14:57 PST 2015
# HG changeset patch
# User Zachary T Welch <zach at mandolincreekfarm.com>
# Fake Node ID 75131cd46ef28b4f69d88224eff4c538cc517cc0
Use logging in run_tests (#2347)
We need to use logging in run_tests, if only to catch the new output
being generated by the drivers. This patch captures a debug.log for the
entire test run while squelching output on the console. The prevents
spurious error messages from being displayed. This may be improved upon
in subsequent patches, but this is necessary to prevent anyone from
seeing confusing output when running the tests.
diff --git a/tests/run_tests b/tests/run_tests
index 9cc05b3..689fe92 100755
--- a/tests/run_tests
+++ b/tests/run_tests
@@ -31,6 +31,17 @@ os.chdir(scriptdir)
sys.path.insert(0, "../")
+import logging
+from chirp import logger
+
+class LoggerOpts(object):
+ quiet = 2
+ verbose = 0
+ log_file = os.path.join('logs', 'debug.log')
+ log_level = logging.DEBUG
+
+logger.handle_options(LoggerOpts())
+
from chirp import CHIRP_VERSION
from chirp.drivers import *
from chirp import chirp_common, directory
More information about the chirp_devel
mailing list