From 09fdf300df1eb29c532abb9e559073f11bc0f920 Mon Sep 17 00:00:00 2001 From: Lucas Meneghel Rodrigues Date: Fri, 27 Feb 2015 17:33:15 -0300 Subject: [PATCH] autotest-client-tests: Optimize imports Signed-off-by: Lucas Meneghel Rodrigues --- aio_dio_bugs/aio_dio_bugs.py | 2 ++ aiostress/aiostress.py | 1 + asynctest/asynctest.py | 2 -- autotest_regression/autotest_regression.py | 1 + barriertest/barriertest.py | 1 + bash_shared_mapping/bash_shared_mapping.py | 1 + bonnie/bonnie.py | 1 + btreplay/btreplay.py | 3 ++- cgroup/cgroup.py | 1 + cgroup/cgroup_client.py | 1 - cgroup_tests/cgroup_tests.py | 1 + cgroup_tests/cpu_high_load_test.py | 1 + cgroup_tests/device_access_test.py | 1 + cgroup_tests/device_rate_test.py | 1 + cgroup_tests/freezer_process_test.py | 3 ++- cgroup_tests/memory_limit_test.py | 1 + cgroup_tests/memory_migrate_test.py | 1 + compilebench/compilebench.py | 2 ++ connectathon/connectathon.py | 3 +-- cpu_hotplug/cpu_hotplug.py | 3 ++- ctcs/ctcs.py | 1 + cyclictest/cyclictest.py | 1 + dacapo/dacapo.py | 1 + dbt2/dbt2.py | 2 ++ disktest/disktest.py | 1 + dma_memtest/dma_memtest.py | 2 +- ebizzy/ebizzy.py | 2 +- error_test_bug/error_test_bug.py | 1 - ffsb/ffsb.py | 1 + fio/fio.py | 1 + flail/flail.py | 1 + fs_mark/fs_mark.py | 1 + fsfuzzer/fsfuzzer.py | 1 + fsstress/fsstress.py | 1 + fsx/fsx.py | 1 + hackbench/hackbench.py | 1 + hwclock/hwclock.py | 6 +++--- interbench/interbench.py | 1 + iosched_bugs/iosched_bugs.py | 1 + iozone/iozone.py | 1 + iperf/iperf.py | 2 ++ isic/isic.py | 1 + kernbench/kernbench.py | 3 +-- kernelbuild/kernelbuild.py | 2 +- kernelinstall/kernelinstall.py | 1 + libhugetlbfs/libhugetlbfs.py | 3 ++- libvirt_test_api/libvirt_test_api.py | 1 - linus_stress/linus_stress.py | 1 + linux-tools/crontab/crontab.py | 5 +++-- linux-tools/pax/pax.py | 2 +- lmbench/lmbench.py | 1 + ltp/ltp-diff.py | 2 +- ltp/ltp.py | 1 + memory_api/memory_api.py | 2 +- monotonic_time/monotonic_time.py | 2 +- netperf2/netperf2.py | 3 ++- netpipe/netpipe.py | 1 + npb/npb.py | 2 +- parallel_dd/parallel_dd.py | 2 +- perfmon/perfmon.py | 3 ++- pi_tests/pi_tests.py | 1 + pktgen/pktgen.py | 1 + posixtest/posixtest.py | 1 + profiler_test/profiler_test.py | 3 ++- qemu_iotests/qemu_iotests.py | 2 +- reaim/reaim.py | 1 + real_time_tests/real_time_tests.py | 1 + regression/regression.py | 1 + rmaptest/rmaptest.py | 2 ++ rtc/rtc.py | 1 + rttester/rttester.py | 3 ++- runtests.py | 10 +++++----- scrashme/scrashme.py | 1 + scsi_testsuite/scsi_testsuite.py | 1 + selftest/selftest.py | 1 + signaltest/signaltest.py | 1 + sleeptest/sleeptest.py | 1 + smatch/smatch.py | 4 ++-- sparse/sparse.py | 3 ++- spew/spew.py | 1 + stress/stress.py | 1 + synctest/synctest.py | 1 + sysbench/sysbench.py | 1 + systemtap/systemtap.py | 1 + tbench/tbench.py | 1 + tiobench/tiobench.py | 1 + tracing_microbenchmark/base_tracer.py | 1 + tracing_microbenchmark/tracers.py | 3 ++- tracing_microbenchmark/tracing_microbenchmark.py | 2 +- tsc/tsc.py | 1 + unixbench/unixbench.py | 1 + unixbench5/unixbench5.py | 1 + wb_kupdate/wb_kupdate.py | 1 + wb_kupdate/wb_kupdate_unittest.py | 6 +----- xfstests/xfstests.py | 3 ++- xmtest/xmtest.py | 1 + 96 files changed, 117 insertions(+), 48 deletions(-) diff --git a/aio_dio_bugs/aio_dio_bugs.py b/aio_dio_bugs/aio_dio_bugs.py index 4773bec83..8aeb9d388 100644 --- a/aio_dio_bugs/aio_dio_bugs.py +++ b/aio_dio_bugs/aio_dio_bugs.py @@ -1,7 +1,9 @@ import os + from autotest.client import test, utils + # tests is a simple array of "cmd" "arguments" tests = [["aio-dio-invalidate-failure", "poo"], ["aio-dio-subblock-eof-read", "eoftest"], diff --git a/aiostress/aiostress.py b/aiostress/aiostress.py index ec7d059ae..1b6dc7a85 100644 --- a/aiostress/aiostress.py +++ b/aiostress/aiostress.py @@ -1,6 +1,7 @@ # This requires aio headers to build. # Should work automagically out of deps now. import os + from autotest.client import test, utils diff --git a/asynctest/asynctest.py b/asynctest/asynctest.py index 6391a4583..5db3e1dfa 100644 --- a/asynctest/asynctest.py +++ b/asynctest/asynctest.py @@ -1,5 +1,3 @@ -import os -import re import time from autotest.client import utils, test diff --git a/autotest_regression/autotest_regression.py b/autotest_regression/autotest_regression.py index a4338efb4..4489dfe36 100644 --- a/autotest_regression/autotest_regression.py +++ b/autotest_regression/autotest_regression.py @@ -1,5 +1,6 @@ import logging import os + from autotest.client import test, utils from autotest.client.shared import git, error diff --git a/barriertest/barriertest.py b/barriertest/barriertest.py index 781b87be3..8a2bbbb04 100644 --- a/barriertest/barriertest.py +++ b/barriertest/barriertest.py @@ -2,6 +2,7 @@ import logging import time + from autotest.client import test from autotest.client.shared import barrier, error diff --git a/bash_shared_mapping/bash_shared_mapping.py b/bash_shared_mapping/bash_shared_mapping.py index eca60c3aa..0bea1ede9 100644 --- a/bash_shared_mapping/bash_shared_mapping.py +++ b/bash_shared_mapping/bash_shared_mapping.py @@ -1,5 +1,6 @@ import signal import os + from autotest.client import utils, test from autotest.client.shared import utils_memory diff --git a/bonnie/bonnie.py b/bonnie/bonnie.py index d3dcddff3..e4049ecac 100644 --- a/bonnie/bonnie.py +++ b/bonnie/bonnie.py @@ -1,5 +1,6 @@ import os import re + from autotest.client import test, os_dep, utils diff --git a/btreplay/btreplay.py b/btreplay/btreplay.py index 49327ad0e..d74f54ddd 100644 --- a/btreplay/btreplay.py +++ b/btreplay/btreplay.py @@ -1,6 +1,7 @@ import time import os -from autotest.client import test, os_dep, utils + +from autotest.client import test, utils from autotest.client.shared import error diff --git a/cgroup/cgroup.py b/cgroup/cgroup.py index b46127f9e..5a1f0b32d 100755 --- a/cgroup/cgroup.py +++ b/cgroup/cgroup.py @@ -15,6 +15,7 @@ from autotest.client import test, utils from autotest.client.shared import error + try: from autotest.client.shared.utils_cgroup import Cgroup, CgroupModules from autotest.client.shared.utils_cgroup import get_load_per_cpu diff --git a/cgroup/cgroup_client.py b/cgroup/cgroup_client.py index 8b770c613..6faad3deb 100755 --- a/cgroup/cgroup_client.py +++ b/cgroup/cgroup_client.py @@ -13,7 +13,6 @@ import time import math import os -from tempfile import mktemp def test_smoke(args): diff --git a/cgroup_tests/cgroup_tests.py b/cgroup_tests/cgroup_tests.py index d721522b2..3458c54bc 100644 --- a/cgroup_tests/cgroup_tests.py +++ b/cgroup_tests/cgroup_tests.py @@ -1,4 +1,5 @@ import logging + from autotest.client import test from autotest.client.shared import error, utils diff --git a/cgroup_tests/cpu_high_load_test.py b/cgroup_tests/cpu_high_load_test.py index 9e082e8d5..89f8accfd 100644 --- a/cgroup_tests/cpu_high_load_test.py +++ b/cgroup_tests/cpu_high_load_test.py @@ -5,6 +5,7 @@ import threading import stat import logging + from autotest.client.shared import error, utils_cgroup, utils, pexpect diff --git a/cgroup_tests/device_access_test.py b/cgroup_tests/device_access_test.py index 790197cc7..aa67f11d5 100644 --- a/cgroup_tests/device_access_test.py +++ b/cgroup_tests/device_access_test.py @@ -1,5 +1,6 @@ import os import tempfile + from autotest.client.shared import error, utils_cgroup diff --git a/cgroup_tests/device_rate_test.py b/cgroup_tests/device_rate_test.py index 6a2553ae0..2d02d2013 100644 --- a/cgroup_tests/device_rate_test.py +++ b/cgroup_tests/device_rate_test.py @@ -1,6 +1,7 @@ import os import itertools import tempfile + from autotest.client.shared import error, utils_cgroup diff --git a/cgroup_tests/freezer_process_test.py b/cgroup_tests/freezer_process_test.py index 4de300732..74b0d7714 100644 --- a/cgroup_tests/freezer_process_test.py +++ b/cgroup_tests/freezer_process_test.py @@ -3,7 +3,8 @@ import subprocess import signal import stat -from autotest.client.shared import error, utils_cgroup, utils + +from autotest.client.shared import error, utils_cgroup def stress_process(shell_file): diff --git a/cgroup_tests/memory_limit_test.py b/cgroup_tests/memory_limit_test.py index 75a5aaf31..e7d3f4951 100644 --- a/cgroup_tests/memory_limit_test.py +++ b/cgroup_tests/memory_limit_test.py @@ -2,6 +2,7 @@ import subprocess import time import logging + from autotest.client import utils from autotest.client.shared import error, utils_cgroup diff --git a/cgroup_tests/memory_migrate_test.py b/cgroup_tests/memory_migrate_test.py index 784236257..56dd1c88c 100644 --- a/cgroup_tests/memory_migrate_test.py +++ b/cgroup_tests/memory_migrate_test.py @@ -4,6 +4,7 @@ import subprocess import signal import time + from autotest.client.shared import error, utils_cgroup diff --git a/compilebench/compilebench.py b/compilebench/compilebench.py index 378ffd20e..9b9467730 100644 --- a/compilebench/compilebench.py +++ b/compilebench/compilebench.py @@ -1,7 +1,9 @@ import os import re + from autotest.client import test, utils + test_name = 'compilebench' diff --git a/connectathon/connectathon.py b/connectathon/connectathon.py index 208aef6d7..a6604a94b 100644 --- a/connectathon/connectathon.py +++ b/connectathon/connectathon.py @@ -1,7 +1,6 @@ import os -import shutil -import glob import logging + from autotest.client import test, utils from autotest.client.shared import error diff --git a/cpu_hotplug/cpu_hotplug.py b/cpu_hotplug/cpu_hotplug.py index 3bd07665f..4b0a15305 100644 --- a/cpu_hotplug/cpu_hotplug.py +++ b/cpu_hotplug/cpu_hotplug.py @@ -3,7 +3,8 @@ import logging import re import sys -from autotest.client import test, utils, os_dep + +from autotest.client import test, utils from autotest.client.shared import error diff --git a/ctcs/ctcs.py b/ctcs/ctcs.py index 7979526e7..7ace5558e 100644 --- a/ctcs/ctcs.py +++ b/ctcs/ctcs.py @@ -2,6 +2,7 @@ import shutil import glob import logging + from autotest.client import test, utils from autotest.client.shared import error diff --git a/cyclictest/cyclictest.py b/cyclictest/cyclictest.py index ad5b69fcc..6f72e0068 100644 --- a/cyclictest/cyclictest.py +++ b/cyclictest/cyclictest.py @@ -1,4 +1,5 @@ import os + from autotest.client import test from autotest.client.shared import utils diff --git a/dacapo/dacapo.py b/dacapo/dacapo.py index 8f62c0cad..914e4052d 100644 --- a/dacapo/dacapo.py +++ b/dacapo/dacapo.py @@ -2,6 +2,7 @@ import re import logging import shutil + from autotest.client import utils, test from autotest.client.test_config import config_loader from autotest.client.shared import error, software_manager diff --git a/dbt2/dbt2.py b/dbt2/dbt2.py index f28d7e04a..8224cb93e 100644 --- a/dbt2/dbt2.py +++ b/dbt2/dbt2.py @@ -1,8 +1,10 @@ import os import shutil + from autotest.client import test, utils + # Dbt-2 is a fair-use implementation of the TPC-C benchmark. The test is # currently hardcoded to use PostgreSQL but the kit also supports MySQL. diff --git a/disktest/disktest.py b/disktest/disktest.py index 41be908e5..a78542645 100644 --- a/disktest/disktest.py +++ b/disktest/disktest.py @@ -2,6 +2,7 @@ import sys import subprocess import logging + from autotest.client import test, utils from autotest.client.shared import error, utils_memory diff --git a/dma_memtest/dma_memtest.py b/dma_memtest/dma_memtest.py index 7d776ea3c..998e6bb1b 100644 --- a/dma_memtest/dma_memtest.py +++ b/dma_memtest/dma_memtest.py @@ -1,9 +1,9 @@ import os -import time import re import subprocess import shutil import logging + from autotest.client import utils, test from autotest.client.shared import error diff --git a/ebizzy/ebizzy.py b/ebizzy/ebizzy.py index fcbe278f0..c7a424d73 100644 --- a/ebizzy/ebizzy.py +++ b/ebizzy/ebizzy.py @@ -1,6 +1,6 @@ import os + from autotest.client import utils, test -from autotest.client.shared import error class ebizzy(test.test): diff --git a/error_test_bug/error_test_bug.py b/error_test_bug/error_test_bug.py index dbf0b0a96..4d9e8cd84 100644 --- a/error_test_bug/error_test_bug.py +++ b/error_test_bug/error_test_bug.py @@ -1,4 +1,3 @@ -from autotest.client.shared import error from autotest.client import test diff --git a/ffsb/ffsb.py b/ffsb/ffsb.py index 13ca4686d..1ba50cf12 100644 --- a/ffsb/ffsb.py +++ b/ffsb/ffsb.py @@ -4,6 +4,7 @@ import re import random import shutil + from autotest.client import test, os_dep, utils from autotest.client.shared import error diff --git a/fio/fio.py b/fio/fio.py index f38b8dc3d..daf61d84a 100644 --- a/fio/fio.py +++ b/fio/fio.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils diff --git a/flail/flail.py b/flail/flail.py index 862aa2d50..813fa09ea 100644 --- a/flail/flail.py +++ b/flail/flail.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils diff --git a/fs_mark/fs_mark.py b/fs_mark/fs_mark.py index 90ed3a7f8..e8051e0f3 100644 --- a/fs_mark/fs_mark.py +++ b/fs_mark/fs_mark.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils diff --git a/fsfuzzer/fsfuzzer.py b/fsfuzzer/fsfuzzer.py index 20771a7ed..017c5f795 100644 --- a/fsfuzzer/fsfuzzer.py +++ b/fsfuzzer/fsfuzzer.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils diff --git a/fsstress/fsstress.py b/fsstress/fsstress.py index e4e063777..2d83f7316 100644 --- a/fsstress/fsstress.py +++ b/fsstress/fsstress.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils diff --git a/fsx/fsx.py b/fsx/fsx.py index e1bcbbb10..8aef75010 100644 --- a/fsx/fsx.py +++ b/fsx/fsx.py @@ -4,6 +4,7 @@ # NOTE - this should also have the ability to mount a filesystem, # run the tests, unmount it, then fsck the filesystem import os + from autotest.client import test, utils diff --git a/hackbench/hackbench.py b/hackbench/hackbench.py index b0aebe5d0..2d6af4cb4 100644 --- a/hackbench/hackbench.py +++ b/hackbench/hackbench.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils diff --git a/hwclock/hwclock.py b/hwclock/hwclock.py index 1797a6477..8811cceb7 100644 --- a/hwclock/hwclock.py +++ b/hwclock/hwclock.py @@ -1,9 +1,9 @@ -from autotest.client import test, utils -from autotest.client.shared import error import re -import os import logging +from autotest.client import test, utils +from autotest.client.shared import error + class hwclock(test.test): version = 1 diff --git a/interbench/interbench.py b/interbench/interbench.py index ade92f19b..890cb2f1d 100644 --- a/interbench/interbench.py +++ b/interbench/interbench.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils diff --git a/iosched_bugs/iosched_bugs.py b/iosched_bugs/iosched_bugs.py index 8a0d5434b..af6049a76 100644 --- a/iosched_bugs/iosched_bugs.py +++ b/iosched_bugs/iosched_bugs.py @@ -1,6 +1,7 @@ import os import time import subprocess + from autotest.client import test from autotest.client.shared import utils, error diff --git a/iozone/iozone.py b/iozone/iozone.py index cf0c2208b..2bbac5f59 100644 --- a/iozone/iozone.py +++ b/iozone/iozone.py @@ -1,5 +1,6 @@ import os import re + from autotest.client import test, utils import postprocessing diff --git a/iperf/iperf.py b/iperf/iperf.py index c7b274ed9..64e73cd19 100644 --- a/iperf/iperf.py +++ b/iperf/iperf.py @@ -3,10 +3,12 @@ import socket import time import logging + from autotest.client import test, utils from autotest.client.net import net_utils from autotest.client.shared import error + MPSTAT_IX = 0 IPERF_IX = 1 diff --git a/isic/isic.py b/isic/isic.py index da48bcc5c..ebecef15b 100644 --- a/isic/isic.py +++ b/isic/isic.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils diff --git a/kernbench/kernbench.py b/kernbench/kernbench.py index e9a33146f..21c96f9db 100644 --- a/kernbench/kernbench.py +++ b/kernbench/kernbench.py @@ -1,7 +1,6 @@ -import re -import pickle import os import logging + from autotest.client import utils, test diff --git a/kernelbuild/kernelbuild.py b/kernelbuild/kernelbuild.py index 30413fd77..5a190b918 100644 --- a/kernelbuild/kernelbuild.py +++ b/kernelbuild/kernelbuild.py @@ -1,4 +1,4 @@ -from autotest.client import test, kernel +from autotest.client import test class kernelbuild(test.test): diff --git a/kernelinstall/kernelinstall.py b/kernelinstall/kernelinstall.py index cbbfccb45..b336e7420 100644 --- a/kernelinstall/kernelinstall.py +++ b/kernelinstall/kernelinstall.py @@ -1,5 +1,6 @@ import os import logging + from autotest.client import test from autotest.client import utils from autotest.client.shared import git, utils_koji, error, software_manager diff --git a/libhugetlbfs/libhugetlbfs.py b/libhugetlbfs/libhugetlbfs.py index 65210bf2a..8b10dfe0d 100644 --- a/libhugetlbfs/libhugetlbfs.py +++ b/libhugetlbfs/libhugetlbfs.py @@ -1,6 +1,7 @@ -import re import os + from autotest.client import utils, test, os_dep + from autotest.client.shared import error diff --git a/libvirt_test_api/libvirt_test_api.py b/libvirt_test_api/libvirt_test_api.py index b666dbcba..836157986 100644 --- a/libvirt_test_api/libvirt_test_api.py +++ b/libvirt_test_api/libvirt_test_api.py @@ -1,5 +1,4 @@ import os -import re import shutil import glob import logging diff --git a/linus_stress/linus_stress.py b/linus_stress/linus_stress.py index a2cb7ba8a..b123a29f1 100644 --- a/linus_stress/linus_stress.py +++ b/linus_stress/linus_stress.py @@ -1,5 +1,6 @@ import os import shutil + from autotest.client import test, utils from autotest.client.shared import utils_memory diff --git a/linux-tools/crontab/crontab.py b/linux-tools/crontab/crontab.py index b52bbe7e3..8a0fb9996 100644 --- a/linux-tools/crontab/crontab.py +++ b/linux-tools/crontab/crontab.py @@ -1,11 +1,12 @@ #!/bin/python import os import shutil -import glob import logging +from time import sleep + from autotest.client import test, utils + from autotest.client.shared import error -from time import sleep class crontab(test.test): diff --git a/linux-tools/pax/pax.py b/linux-tools/pax/pax.py index 487e0e2fb..5b23cd5fb 100644 --- a/linux-tools/pax/pax.py +++ b/linux-tools/pax/pax.py @@ -1,8 +1,8 @@ #!/bin/python import os import shutil -import glob import logging + from autotest.client import test, utils from autotest.client.shared import error, software_manager diff --git a/lmbench/lmbench.py b/lmbench/lmbench.py index 34bf6a014..d64ceaa75 100644 --- a/lmbench/lmbench.py +++ b/lmbench/lmbench.py @@ -1,5 +1,6 @@ # This will need more work on the configuration stuff before it will function import os + from autotest.client import test, utils from autotest.client.shared import error diff --git a/ltp/ltp-diff.py b/ltp/ltp-diff.py index 86f2ac8b7..29dc77404 100755 --- a/ltp/ltp-diff.py +++ b/ltp/ltp-diff.py @@ -15,8 +15,8 @@ import sys -import string import re + from autotest.client.shared import utils diff --git a/ltp/ltp.py b/ltp/ltp.py index 5219a6aa1..2222f9ecb 100644 --- a/ltp/ltp.py +++ b/ltp/ltp.py @@ -1,5 +1,6 @@ import os import shutil + from autotest.client import utils, test from autotest.client.shared import error diff --git a/memory_api/memory_api.py b/memory_api/memory_api.py index ee4af46db..a29d954fb 100644 --- a/memory_api/memory_api.py +++ b/memory_api/memory_api.py @@ -1,8 +1,8 @@ import os import subprocess import re -import commands import logging + from autotest.client import utils, test from autotest.client.shared import error diff --git a/monotonic_time/monotonic_time.py b/monotonic_time/monotonic_time.py index bf5eab17f..1d4c19f61 100644 --- a/monotonic_time/monotonic_time.py +++ b/monotonic_time/monotonic_time.py @@ -1,6 +1,6 @@ import os -import re import logging + from autotest.client import test, utils from autotest.client.shared import error diff --git a/netperf2/netperf2.py b/netperf2/netperf2.py index 8266708b7..44d4f0cf5 100644 --- a/netperf2/netperf2.py +++ b/netperf2/netperf2.py @@ -1,11 +1,12 @@ import os import time -import re import logging + from autotest.client import test, utils from autotest.client.net import net_utils from autotest.client.shared import error + MPSTAT_IX = 0 NETPERF_IX = 1 diff --git a/netpipe/netpipe.py b/netpipe/netpipe.py index a02ca5ddd..db32372a3 100644 --- a/netpipe/netpipe.py +++ b/netpipe/netpipe.py @@ -1,6 +1,7 @@ import os import time import logging + from autotest.client import test, utils from autotest.client.shared import error diff --git a/npb/npb.py b/npb/npb.py index b730fe8de..52646e11a 100644 --- a/npb/npb.py +++ b/npb/npb.py @@ -1,7 +1,7 @@ import os -import shutil import logging import re + from autotest.client import test, utils from autotest.client.shared import error diff --git a/parallel_dd/parallel_dd.py b/parallel_dd/parallel_dd.py index 928fe9fed..244f38ed5 100644 --- a/parallel_dd/parallel_dd.py +++ b/parallel_dd/parallel_dd.py @@ -1,9 +1,9 @@ import os -import re import time import subprocess import sys import logging + from autotest.client import test, utils from autotest.client.shared import error diff --git a/perfmon/perfmon.py b/perfmon/perfmon.py index 09d995ccf..c67630e4f 100644 --- a/perfmon/perfmon.py +++ b/perfmon/perfmon.py @@ -1,8 +1,9 @@ import os -import re + from autotest.client import utils, test from autotest.client.shared import error + # test requires at least 2.6.26, will skip otherwise (check is internal) diff --git a/pi_tests/pi_tests.py b/pi_tests/pi_tests.py index 7c3bfcf8c..def4774a0 100644 --- a/pi_tests/pi_tests.py +++ b/pi_tests/pi_tests.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils diff --git a/pktgen/pktgen.py b/pktgen/pktgen.py index 05d654f06..e295ce2c6 100644 --- a/pktgen/pktgen.py +++ b/pktgen/pktgen.py @@ -1,5 +1,6 @@ import os import logging + from autotest.client import test, utils from autotest.client.shared import error diff --git a/posixtest/posixtest.py b/posixtest/posixtest.py index 3c09af8ee..bc8a52ad6 100644 --- a/posixtest/posixtest.py +++ b/posixtest/posixtest.py @@ -1,6 +1,7 @@ # POSIX test suite wrapper class. More information about the suite can be found # at http://posixtest.sourceforge.net/ import os + from autotest.client import test, utils diff --git a/profiler_test/profiler_test.py b/profiler_test/profiler_test.py index a462d78ee..f8bec76cb 100644 --- a/profiler_test/profiler_test.py +++ b/profiler_test/profiler_test.py @@ -1,6 +1,7 @@ import time + from autotest.client.shared import error -from autotest.client import test, utils +from autotest.client import test class profiler_test(test.test): diff --git a/qemu_iotests/qemu_iotests.py b/qemu_iotests/qemu_iotests.py index d29b6a986..875d536d0 100644 --- a/qemu_iotests/qemu_iotests.py +++ b/qemu_iotests/qemu_iotests.py @@ -1,6 +1,6 @@ import os import re -import logging + from autotest.client import test, utils, os_dep from autotest.client.shared import error diff --git a/reaim/reaim.py b/reaim/reaim.py index 1b10e0554..086b9e876 100644 --- a/reaim/reaim.py +++ b/reaim/reaim.py @@ -1,6 +1,7 @@ # Needs autoconf & automake & libtool to be installed. Ewwwwwwwwwwwwwwwwwwwwww import re import os + from autotest.client import test, utils, os_dep diff --git a/real_time_tests/real_time_tests.py b/real_time_tests/real_time_tests.py index d8c7638d4..0ecbf923b 100644 --- a/real_time_tests/real_time_tests.py +++ b/real_time_tests/real_time_tests.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils diff --git a/regression/regression.py b/regression/regression.py index ff731f45a..ff7946da7 100644 --- a/regression/regression.py +++ b/regression/regression.py @@ -1,4 +1,5 @@ import logging + from autotest.client import test, utils from autotest.client.shared import error diff --git a/rmaptest/rmaptest.py b/rmaptest/rmaptest.py index 9d70041f8..83e8c4b2d 100644 --- a/rmaptest/rmaptest.py +++ b/rmaptest/rmaptest.py @@ -1,7 +1,9 @@ import os + from autotest.client import test, utils + # tests is a simple array of "cmd" "arguments" tests = [["rmaptest", "-h -i100 -n100 -s100 -t100 -V10 -v file1.dat"], ["rmaptest", "-l -i100 -n100 -s100 -t100 -V10 -v file2.dat"], diff --git a/rtc/rtc.py b/rtc/rtc.py index d4a71a386..bf72ddc92 100644 --- a/rtc/rtc.py +++ b/rtc/rtc.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils from autotest.client.shared import error diff --git a/rttester/rttester.py b/rttester/rttester.py index cdae390dd..6e8804ec4 100644 --- a/rttester/rttester.py +++ b/rttester/rttester.py @@ -1,5 +1,6 @@ import os -from autotest.client import test, utils, os_dep + +from autotest.client import test, utils class rttester(test.test): diff --git a/runtests.py b/runtests.py index 7942e4617..d0f0a523f 100755 --- a/runtests.py +++ b/runtests.py @@ -16,17 +16,17 @@ __author__ = 'Lucas Meneghel Rodrigues ' -from nose.selector import Selector +import logging +import os +import sys +from nose.selector import Selector from nose.plugins import Plugin from nose.plugins.attrib import AttributeSelector + from nose.plugins.xunit import Xunit from nose.plugins.cover import Coverage - -import logging -import os import nose -import sys logger = logging.getLogger(__name__) diff --git a/scrashme/scrashme.py b/scrashme/scrashme.py index 13b027cd5..31c96cbda 100644 --- a/scrashme/scrashme.py +++ b/scrashme/scrashme.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils diff --git a/scsi_testsuite/scsi_testsuite.py b/scsi_testsuite/scsi_testsuite.py index 6bb61fa1e..c642a88af 100644 --- a/scsi_testsuite/scsi_testsuite.py +++ b/scsi_testsuite/scsi_testsuite.py @@ -2,6 +2,7 @@ import os import logging import shutil + from autotest.client import utils, test from autotest.client.shared import git, software_manager, error diff --git a/selftest/selftest.py b/selftest/selftest.py index 58370f7fe..f5fe56727 100644 --- a/selftest/selftest.py +++ b/selftest/selftest.py @@ -1,6 +1,7 @@ import os import sys import logging + from autotest.client import test from autotest.client.shared import error diff --git a/signaltest/signaltest.py b/signaltest/signaltest.py index 0b29e6e56..df69eadb1 100644 --- a/signaltest/signaltest.py +++ b/signaltest/signaltest.py @@ -1,4 +1,5 @@ import os + from autotest.client import test from autotest.client.shared import utils diff --git a/sleeptest/sleeptest.py b/sleeptest/sleeptest.py index cba99c28f..381f5c946 100644 --- a/sleeptest/sleeptest.py +++ b/sleeptest/sleeptest.py @@ -1,4 +1,5 @@ import time + from autotest.client import test diff --git a/smatch/smatch.py b/smatch/smatch.py index e06df79a7..396c2fbb2 100644 --- a/smatch/smatch.py +++ b/smatch/smatch.py @@ -1,9 +1,9 @@ import os import logging -import commands import re import shutil -from autotest.client import kernel, test, utils + +from autotest.client import test, utils from autotest.client.shared import software_manager, error diff --git a/sparse/sparse.py b/sparse/sparse.py index 792666d58..3e00bb02b 100644 --- a/sparse/sparse.py +++ b/sparse/sparse.py @@ -1,7 +1,8 @@ import os import re + from autotest.client.shared import error -from autotest.client import test, utils, kernel +from autotest.client import test, utils class sparse(test.test): diff --git a/spew/spew.py b/spew/spew.py index 70fe162b5..700ac2af2 100644 --- a/spew/spew.py +++ b/spew/spew.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils diff --git a/stress/stress.py b/stress/stress.py index fc0ea5358..6ef3761fe 100644 --- a/stress/stress.py +++ b/stress/stress.py @@ -1,4 +1,5 @@ import os + from autotest.client import test, utils from autotest.client.shared import utils_memory diff --git a/synctest/synctest.py b/synctest/synctest.py index 5d7653d84..02f7dc382 100644 --- a/synctest/synctest.py +++ b/synctest/synctest.py @@ -1,4 +1,5 @@ import os + from autotest.client import test from autotest.client.shared import utils diff --git a/sysbench/sysbench.py b/sysbench/sysbench.py index 915df1c60..d8712efb4 100644 --- a/sysbench/sysbench.py +++ b/sysbench/sysbench.py @@ -2,6 +2,7 @@ import time import re import pwd + from autotest.client import test, utils from autotest.client.shared import error diff --git a/systemtap/systemtap.py b/systemtap/systemtap.py index ef3fcfbb4..d3d69a516 100644 --- a/systemtap/systemtap.py +++ b/systemtap/systemtap.py @@ -1,6 +1,7 @@ import os import shutil import re + from autotest.client import test, utils from autotest.client.shared import error diff --git a/tbench/tbench.py b/tbench/tbench.py index 54af93ee6..6aad89882 100644 --- a/tbench/tbench.py +++ b/tbench/tbench.py @@ -2,6 +2,7 @@ import os import signal import re + from autotest.client import test, utils diff --git a/tiobench/tiobench.py b/tiobench/tiobench.py index ee6f1cfd2..8287cc90f 100644 --- a/tiobench/tiobench.py +++ b/tiobench/tiobench.py @@ -1,5 +1,6 @@ import os import logging + from autotest.client import test, utils diff --git a/tracing_microbenchmark/base_tracer.py b/tracing_microbenchmark/base_tracer.py index bf9ab4b7e..ffb2bb9d7 100644 --- a/tracing_microbenchmark/base_tracer.py +++ b/tracing_microbenchmark/base_tracer.py @@ -1,4 +1,5 @@ import os + from autotest.client import utils diff --git a/tracing_microbenchmark/tracers.py b/tracing_microbenchmark/tracers.py index 8114a5f39..14a20fcad 100644 --- a/tracing_microbenchmark/tracers.py +++ b/tracing_microbenchmark/tracers.py @@ -1,7 +1,8 @@ import os -from autotest.client import utils +from autotest.client import utils import base_tracer + try: from site_tracers import * except ImportError: diff --git a/tracing_microbenchmark/tracing_microbenchmark.py b/tracing_microbenchmark/tracing_microbenchmark.py index 42a9ed17b..7b78a4285 100644 --- a/tracing_microbenchmark/tracing_microbenchmark.py +++ b/tracing_microbenchmark/tracing_microbenchmark.py @@ -1,8 +1,8 @@ import os import re + from autotest.client import test from autotest.client import utils - import tracers import base_tracer diff --git a/tsc/tsc.py b/tsc/tsc.py index 65273d6c2..2c2741c88 100644 --- a/tsc/tsc.py +++ b/tsc/tsc.py @@ -1,6 +1,7 @@ import os import re import logging + from autotest.client import test, utils from autotest.client.shared import error diff --git a/unixbench/unixbench.py b/unixbench/unixbench.py index 2685cccfa..d95b030e0 100644 --- a/unixbench/unixbench.py +++ b/unixbench/unixbench.py @@ -1,5 +1,6 @@ import os import re + from autotest.client import test, utils from autotest.client.shared import error diff --git a/unixbench5/unixbench5.py b/unixbench5/unixbench5.py index f214b54d3..2286205c3 100644 --- a/unixbench5/unixbench5.py +++ b/unixbench5/unixbench5.py @@ -1,5 +1,6 @@ import os import re + from autotest.client import test, utils from autotest.client.shared import error diff --git a/wb_kupdate/wb_kupdate.py b/wb_kupdate/wb_kupdate.py index e55bd862a..04b8bfad3 100644 --- a/wb_kupdate/wb_kupdate.py +++ b/wb_kupdate/wb_kupdate.py @@ -2,6 +2,7 @@ import logging import os import time + from autotest.client import test, utils from autotest.client.shared import error, utils_memory diff --git a/wb_kupdate/wb_kupdate_unittest.py b/wb_kupdate/wb_kupdate_unittest.py index 3b59bf4b9..79c432c6e 100755 --- a/wb_kupdate/wb_kupdate_unittest.py +++ b/wb_kupdate/wb_kupdate_unittest.py @@ -1,13 +1,9 @@ #!/usr/bin/python -import common import datetime import logging -import os -import time import unittest -from autotest.client import test -from autotest.client import utils + from autotest.client.shared import error from autotest.client.shared.test_utils import mock import wb_kupdate diff --git a/xfstests/xfstests.py b/xfstests/xfstests.py index 322d1c765..e7a5cddaf 100644 --- a/xfstests/xfstests.py +++ b/xfstests/xfstests.py @@ -2,7 +2,8 @@ import re import glob import logging -from autotest.client.shared import error, software_manager + +from autotest.client.shared import error from autotest.client import test, utils, os_dep diff --git a/xmtest/xmtest.py b/xmtest/xmtest.py index d44e70f3f..9bfbc0880 100644 --- a/xmtest/xmtest.py +++ b/xmtest/xmtest.py @@ -4,6 +4,7 @@ # Autotest script for running Xen xm-test # This should be run from a Xen domain0 import os + from autotest.client import test, utils