diff options
Diffstat (limited to 'scripts/patchtest')
| -rwxr-xr-x | scripts/patchtest | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/scripts/patchtest b/scripts/patchtest index 0be7062dc2..3ca8c6e48f 100755 --- a/scripts/patchtest +++ b/scripts/patchtest | |||
| @@ -9,12 +9,12 @@ | |||
| 9 | # SPDX-License-Identifier: GPL-2.0-only | 9 | # SPDX-License-Identifier: GPL-2.0-only |
| 10 | # | 10 | # |
| 11 | 11 | ||
| 12 | import sys | 12 | import json |
| 13 | import os | ||
| 14 | import unittest | ||
| 15 | import logging | 13 | import logging |
| 14 | import os | ||
| 15 | import sys | ||
| 16 | import traceback | 16 | import traceback |
| 17 | import json | 17 | import unittest |
| 18 | 18 | ||
| 19 | # Include current path so test cases can see it | 19 | # Include current path so test cases can see it |
| 20 | sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) | 20 | sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) |
| @@ -25,13 +25,14 @@ sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '.. | |||
| 25 | from data import PatchTestInput | 25 | from data import PatchTestInput |
| 26 | from repo import PatchTestRepo | 26 | from repo import PatchTestRepo |
| 27 | 27 | ||
| 28 | import utils | 28 | logger = logging.getLogger("patchtest") |
| 29 | logger = utils.logger_create('patchtest') | 29 | loggerhandler = logging.StreamHandler() |
| 30 | loggerhandler.setFormatter(logging.Formatter("%(message)s")) | ||
| 31 | logger.addHandler(loggerhandler) | ||
| 32 | logger.setLevel(logging.INFO) | ||
| 30 | info = logger.info | 33 | info = logger.info |
| 31 | error = logger.error | 34 | error = logger.error |
| 32 | 35 | ||
| 33 | import repo | ||
| 34 | |||
| 35 | def getResult(patch, mergepatch, logfile=None): | 36 | def getResult(patch, mergepatch, logfile=None): |
| 36 | 37 | ||
| 37 | class PatchTestResult(unittest.TextTestResult): | 38 | class PatchTestResult(unittest.TextTestResult): |
