releasetools: Log to stdout when running tests.
This sets up the root logger while running tests. It also logs to stdout, as our Python test result parser doesn't like outputs from stderr. Test: `python -m unittest discover build/make/tools/releasetools \ > /dev/null` doesn't print log lines. Change-Id: Ic99711bd458bc4b67b38226786fed604c2168476
This commit is contained in:
@@ -18,13 +18,18 @@
|
|||||||
Utils for running unittests.
|
Utils for running unittests.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import logging
|
||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import struct
|
import struct
|
||||||
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import common
|
import common
|
||||||
|
|
||||||
|
# Some test runner doesn't like outputs from stderr.
|
||||||
|
logging.basicConfig(stream=sys.stdout)
|
||||||
|
|
||||||
|
|
||||||
def get_testdata_dir():
|
def get_testdata_dir():
|
||||||
"""Returns the testdata dir, in relative to the script dir."""
|
"""Returns the testdata dir, in relative to the script dir."""
|
||||||
|
Reference in New Issue
Block a user