Index: lnt/external/stats/pstat.py =================================================================== --- lnt/external/stats/pstat.py +++ lnt/external/stats/pstat.py @@ -106,7 +106,6 @@ ## 11/08/98 ... fixed aput to output large arrays correctly from __future__ import print_function -import stats # required 3rd party module import string, copy from types import * Index: lnt/external/stats/stats.py =================================================================== --- lnt/external/stats/stats.py +++ lnt/external/stats/stats.py @@ -223,7 +223,7 @@ ## fixed (a)histogram (which sometimes counted points 0: @@ -416,7 +444,7 @@ old_field = old_machine_fields.pop(name, None) # Add missing columns if old_field is None and not dry_run: - column = testsuitedb.make_machine_column(name) + column = make_machine_column(name) util.add_column(connectable, '%s_Machine' % ts_name, column) if len(old_machine_fields) > 0: Index: lnt/server/db/testsuitedb.py =================================================================== --- lnt/server/db/testsuitedb.py +++ lnt/server/db/testsuitedb.py @@ -18,7 +18,7 @@ from typing import List from lnt.util import logger -import testsuite +from . import testsuite import lnt.testing.profile.profile as profile import lnt from lnt.server.ui.util import convert_revision @@ -32,35 +32,6 @@ base_dict[key] = value -_sample_type_to_sql = { - 'Real': Float, - 'Hash': String, - 'Status': Integer, -} - - -def is_known_sample_type(name): - return name in _sample_type_to_sql - - -def make_sample_column(name, type): - sqltype = _sample_type_to_sql.get(type) - if sqltype is None: - raise ValueError("test suite defines unknown sample type %r" % type) - options = [] - if type == 'Status': - options.append(ForeignKey(testsuite.StatusKind.id)) - return Column(name, sqltype, *options) - - -def make_run_column(name): - return Column(name, String(256)) - - -def make_machine_column(name): - return Column(name, String(256)) - - class MachineInfoChanged(ValueError): pass @@ -152,7 +123,8 @@ raise ValueError("test suite defines reserved key %r" % ( iname)) - class_dict[iname] = item.column = make_machine_column(iname) + item.column = testsuite.make_machine_column(iname) + class_dict[iname] = item.column def __init__(self, name_value): self.id = None @@ -355,7 +327,8 @@ raise ValueError("test suite defines reserved key %r" % (iname,)) - class_dict[iname] = item.column = make_run_column(iname) + item.column = testsuite.make_run_column(iname) + class_dict[iname] = item.column def __init__(self, new_id, machine, order, start_time, end_time): self.id = new_id @@ -536,7 +509,8 @@ raise ValueError("test suite defines reserved key %r" % (iname,)) - item.column = make_sample_column(iname, item.type.name) + item.column = testsuite.make_sample_column(iname, + item.type.name) class_dict[iname] = item.column def __init__(self, run, test, **kwargs): Index: lnt/testing/profile/__init__.py =================================================================== --- lnt/testing/profile/__init__.py +++ lnt/testing/profile/__init__.py @@ -1,7 +1,7 @@ # This is the profile implementation registry. Register new profile # implementations here. -from profilev1impl import ProfileV1 -from profilev2impl import ProfileV2 -from perf import LinuxPerfProfile +from .profilev1impl import ProfileV1 +from .profilev2impl import ProfileV2 +from .perf import LinuxPerfProfile IMPLEMENTATIONS = {0: LinuxPerfProfile, 1: ProfileV1, 2: ProfileV2} Index: lnt/testing/profile/perf.py =================================================================== --- lnt/testing/profile/perf.py +++ lnt/testing/profile/perf.py @@ -1,6 +1,6 @@ from lnt.util import logger -from profile import ProfileImpl -from profilev1impl import ProfileV1 +from .profile import ProfileImpl +from .profilev1impl import ProfileV1 import os import traceback Index: lnt/testing/profile/profilev2impl.py =================================================================== --- lnt/testing/profile/profilev2impl.py +++ lnt/testing/profile/profilev2impl.py @@ -1,4 +1,4 @@ -from profile import ProfileImpl +from .profile import ProfileImpl import StringIO import bz2 import copy Index: lnt/tests/nt.py =================================================================== --- lnt/tests/nt.py +++ lnt/tests/nt.py @@ -33,7 +33,7 @@ from lnt.server.reporting.analysis import REGRESSED, IMPROVED from lnt.util import logger from lnt.lnttool.common import submit_options -import builtintest +from . import builtintest class TestModule(object):