@@ -32,7 +32,7 @@ log = logging.getLogger('build-perf')
runCmd2 = partial(runCmd, assert_error=False, limit_exc_output=40)
-class KernelDropCaches(object):
+class KernelDropCaches:
"""Container of the functions for dropping kernel caches"""
sudo_passwd = None
@@ -15,7 +15,7 @@ from oeqa.core.loader import OETestLoader
from oeqa.core.runner import OETestRunner
from oeqa.core.exception import OEQAMissingManifest, OEQATestNotFound
-class OETestContext(object):
+class OETestContext:
loaderClass = OETestLoader
runnerClass = OETestRunner
@@ -97,7 +97,7 @@ class OETestContext(object):
self.runner = self.runnerClass(self, verbosity=2)
return self.runner.list_tests(self.suites, display_type)
-class OETestContextExecutor(object):
+class OETestContextExecutor:
_context_class = OETestContext
_script_executor = 'oe-test'
@@ -15,7 +15,7 @@ import sys
from unittest import TextTestResult as _TestResult
from unittest import TextTestRunner as _TestRunner
-class OEStreamLogger(object):
+class OEStreamLogger:
def __init__(self, logger):
self.logger = logger
self.buffer = ""
@@ -243,7 +243,7 @@ class OETestResult(_TestResult):
# Account for expected failures
return not self.wasSuccessful() or len(self.expectedFailures)
-class OEListTestsResult(object):
+class OEListTestsResult:
def wasSuccessful(self):
return True
@@ -333,7 +333,7 @@ class OETestRunner(_TestRunner):
return OEListTestsResult()
-class OETestResultJSONHelper(object):
+class OETestResultJSONHelper:
testresult_filename = 'testresults.json'
@@ -6,7 +6,7 @@
from abc import abstractmethod
-class OETarget(object):
+class OETarget:
def __init__(self, logger, *args, **kwargs):
self.logger = logger
@@ -203,7 +203,7 @@ subunit._OutSideTest.addSkip = outSideTestaddSkip
# is available and accepts writes. This allows unittest with buffer=True
# to interact ok with subunit which wants to access sys.stdout.buffer.
#
-class dummybuf(object):
+class dummybuf:
def __init__(self, parent):
self.p = parent
def write(self, data):
@@ -155,7 +155,7 @@ def custom_verbose(msg, *args, **kwargs):
logger.info(_buffer_logger.rstrip("\n"), *args, **kwargs)
_buffer_logger = ""
-class TestContext(object):
+class TestContext:
def __init__(self, d, exported=False):
self.d = d
@@ -37,7 +37,7 @@ from oeqa.utils.sshcontrol import SSHControl
# this isn't pretty but we need a fake target object
# for running the tests externally as we don't care
# about deploy/start we only care about the connection methods (run, copy)
-class FakeTarget(object):
+class FakeTarget:
def __init__(self, d):
self.connection = None
self.ip = None
@@ -4,7 +4,7 @@
# SPDX-License-Identifier: MIT
#
-class TestSDK(object):
+class TestSDK:
def run(self, d):
import json
import logging
@@ -6,7 +6,7 @@
from oeqa.sdk.context import OESDKTestContext, OESDKTestContextExecutor
-class TestSDKBase(object):
+class TestSDKBase:
@staticmethod
def get_sdk_configuration(d, test_type):
import platform
@@ -30,7 +30,7 @@ DIFFERENT = 'DIFFERENT'
SAME = 'SAME'
@functools.total_ordering
-class CompareResult(object):
+class CompareResult:
def __init__(self):
self.reference = None
self.test = None
@@ -42,7 +42,7 @@ class CompareResult(object):
def __lt__(self, other):
return (self.status, self.test) < (other.status, other.test)
-class PackageCompareResults(object):
+class PackageCompareResults:
def __init__(self, exclusions):
self.total = []
self.missing = []
@@ -13,7 +13,7 @@ import threading
import time
import signal
-class MemLogger(object):
+class MemLogger:
def __init__(self):
self.info_msgs = []
self.error_msgs = []
@@ -12,7 +12,7 @@ from oeqa.utils.commands import bitbake, get_bb_var, get_bb_vars
import oe.spdx30
-class SPDX3CheckBase(object):
+class SPDX3CheckBase:
"""
Base class for checking SPDX 3 based tests
"""
@@ -25,7 +25,7 @@ try:
except ImportError:
pass
-class Command(object):
+class Command:
def __init__(self, command, bg=False, timeout=None, data=None, output_log=None, **options):
self.defaultopts = {
@@ -161,7 +161,7 @@ class Command(object):
self.log.debug("Last 20 lines:\n%s" % lout)
-class Result(object):
+class Result:
pass
@@ -16,7 +16,7 @@ import threading
import signal
from functools import wraps
-class testcase(object):
+class testcase:
def __init__(self, test_case):
self.test_case = test_case
@@ -12,7 +12,7 @@ import datetime
import itertools
from .commands import runCmd
-class BaseDumper(object):
+class BaseDumper:
""" Base class to dump commands from host/target """
def __init__(self, cmds, parent_dir):
@@ -13,7 +13,7 @@ class GitError(Exception):
"""Git error handling"""
pass
-class GitRepo(object):
+class GitRepo:
"""Class representing a Git repository clone"""
def __init__(self, path, is_topdir=False):
git_dir = self._run_git_cmd_at(['rev-parse', '--git-dir'], path)
@@ -9,7 +9,7 @@ import os
import re
# A parser that can be used to identify weather a line is a test result or a section statement.
-class PtestParser(object):
+class PtestParser:
def __init__(self):
self.results = {}
self.sections = {}
@@ -144,7 +144,7 @@ class LtpParser:
# ltp Compliance log parsing
-class LtpComplianceParser(object):
+class LtpComplianceParser:
def __init__(self):
self.results = {}
self.section = {'duration': "", 'log': ""}
@@ -14,7 +14,7 @@ import os
import select
-class SSHProcess(object):
+class SSHProcess:
def __init__(self, **options):
self.defaultopts = {
@@ -99,7 +99,7 @@ class SSHProcess(object):
raise
return (self.status, self.output)
-class SSHControl(object):
+class SSHControl:
def __init__(self, ip, logfile=None, timeout=300, user='root', port=None):
self.ip = ip
self.defaulttimeout = timeout
All classes are new-style in Python 3 so inheriting from object is redundant. AI-Generated: Uses Claude Opus 5.5 Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> --- meta/lib/oeqa/buildperf/base.py | 2 +- meta/lib/oeqa/core/context.py | 4 ++-- meta/lib/oeqa/core/runner.py | 6 +++--- meta/lib/oeqa/core/target/__init__.py | 2 +- meta/lib/oeqa/core/utils/concurrencytest.py | 2 +- meta/lib/oeqa/oetest.py | 2 +- meta/lib/oeqa/runexported.py | 2 +- meta/lib/oeqa/sdk/testmetaidesupport.py | 2 +- meta/lib/oeqa/sdk/testsdk.py | 2 +- meta/lib/oeqa/selftest/cases/reproducible.py | 4 ++-- meta/lib/oeqa/selftest/cases/runcmd.py | 2 +- meta/lib/oeqa/selftest/cases/spdx.py | 2 +- meta/lib/oeqa/utils/commands.py | 4 ++-- meta/lib/oeqa/utils/decorators.py | 2 +- meta/lib/oeqa/utils/dump.py | 2 +- meta/lib/oeqa/utils/git.py | 2 +- meta/lib/oeqa/utils/logparser.py | 4 ++-- meta/lib/oeqa/utils/sshcontrol.py | 4 ++-- 18 files changed, 25 insertions(+), 25 deletions(-)