diff options
author | Tom Rini <trini@konsulko.com> | 2018-07-11 09:40:38 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-07-11 09:40:38 -0400 |
commit | 1703fbefd9183fffd76f4744a73f5ca9daef6313 (patch) | |
tree | d1155db77dc38ebb02aa0ee66f4559032c092d74 /test/py/conftest.py | |
parent | 421be6fca5cbe0d9dd3a10467529eed53528c258 (diff) | |
parent | 8793631ec13ee9e6c7189a7bdca38dde7b4390a8 (diff) |
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'test/py/conftest.py')
-rw-r--r-- | test/py/conftest.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/py/conftest.py b/test/py/conftest.py index 446d8cb6faf..5c658b8c484 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -18,11 +18,15 @@ import os import os.path import pytest from _pytest.runner import runtestprotocol -import ConfigParser import re import StringIO import sys +try: + import configparser +except: + import ConfigParser as configparser + # Globals: The HTML log file, and the connection to the U-Boot console. log = None console = None @@ -166,7 +170,7 @@ def pytest_configure(config): with open(dot_config, 'rt') as f: ini_str = '[root]\n' + f.read() ini_sio = StringIO.StringIO(ini_str) - parser = ConfigParser.RawConfigParser() + parser = configparser.RawConfigParser() parser.readfp(ini_sio) ubconfig.buildconfig.update(parser.items('root')) @@ -586,7 +590,7 @@ def pytest_runtest_protocol(item, nextitem): # is fixed, if this exception still exists, it will then be logged as # part of the test's stdout. import traceback - print 'Exception occurred while logging runtest status:' + print('Exception occurred while logging runtest status:') traceback.print_exc() # FIXME: Can we force a test failure here? |