summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/utils/__init__.py20
-rw-r--r--meta/lib/oeqa/utils/package_manager.py4
2 files changed, 4 insertions, 20 deletions
diff --git a/meta/lib/oeqa/utils/__init__.py b/meta/lib/oeqa/utils/__init__.py
index 70fbe7b552..6d1ec4cb99 100644
--- a/meta/lib/oeqa/utils/__init__.py
+++ b/meta/lib/oeqa/utils/__init__.py
@@ -43,28 +43,12 @@ def make_logger_bitbake_compatible(logger):
43 import logging 43 import logging
44 44
45 """ 45 """
46 Bitbake logger redifines debug() in order to 46 We need to raise the log level of the info output so unittest
47 set a level within debug, this breaks compatibility 47 messages are visible on the console.
48 with vainilla logging, so we neeed to redifine debug()
49 method again also add info() method with INFO + 1 level.
50 """ 48 """
51 def _bitbake_log_debug(*args, **kwargs):
52 lvl = logging.DEBUG
53
54 if isinstance(args[0], int):
55 lvl = args[0]
56 msg = args[1]
57 args = args[2:]
58 else:
59 msg = args[0]
60 args = args[1:]
61
62 logger.log(lvl, msg, *args, **kwargs)
63
64 def _bitbake_log_info(msg, *args, **kwargs): 49 def _bitbake_log_info(msg, *args, **kwargs):
65 logger.log(logging.INFO + 1, msg, *args, **kwargs) 50 logger.log(logging.INFO + 1, msg, *args, **kwargs)
66 51
67 logger.debug = _bitbake_log_debug
68 logger.info = _bitbake_log_info 52 logger.info = _bitbake_log_info
69 53
70 return logger 54 return logger
diff --git a/meta/lib/oeqa/utils/package_manager.py b/meta/lib/oeqa/utils/package_manager.py
index 3623299295..6b67f22fdd 100644
--- a/meta/lib/oeqa/utils/package_manager.py
+++ b/meta/lib/oeqa/utils/package_manager.py
@@ -117,7 +117,7 @@ def extract_packages(d, needed_packages):
117 extract = package.get('extract', True) 117 extract = package.get('extract', True)
118 118
119 if extract: 119 if extract:
120 #logger.debug(1, 'Extracting %s' % pkg) 120 #logger.debug('Extracting %s' % pkg)
121 dst_dir = os.path.join(extracted_path, pkg) 121 dst_dir = os.path.join(extracted_path, pkg)
122 # Same package used for more than one test, 122 # Same package used for more than one test,
123 # don't need to extract again. 123 # don't need to extract again.
@@ -130,7 +130,7 @@ def extract_packages(d, needed_packages):
130 shutil.rmtree(pkg_dir) 130 shutil.rmtree(pkg_dir)
131 131
132 else: 132 else:
133 #logger.debug(1, 'Copying %s' % pkg) 133 #logger.debug('Copying %s' % pkg)
134 _copy_package(d, pkg) 134 _copy_package(d, pkg)
135 135
136def _extract_in_tmpdir(d, pkg): 136def _extract_in_tmpdir(d, pkg):