* [PATCH v2 1/2] framework: Move test-specific files to test directory
@ 2022-04-11 17:55 ohilyard
2022-04-11 17:55 ` [PATCH v2 2/2] update files depending on tests/util ohilyard
2022-04-13 7:25 ` [PATCH v2 1/2] framework: Move test-specific files to test directory Juraj Linkeš
0 siblings, 2 replies; 7+ messages in thread
From: ohilyard @ 2022-04-11 17:55 UTC (permalink / raw)
To: dts; +Cc: lijuan.tu, juraj.linkes, Owen Hilyard
From: Owen Hilyard <ohilyard@iol.unh.edu>
The DTS Improvement Working Group decided to move files specific to a
single test or a small group of tests into tests/util. This is done in order
to aid in the organization of DTS.
Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
---
framework/flow/__init__.py | 0
framework/virt_resource.py | 2 +-
tests/data/__init__.py | 2 ++
tests/util/__init__.py | 2 ++
tests/util/flow/__init__.py | 2 ++
{framework => tests/util}/flow/enums.py | 0
{framework => tests/util}/flow/exceptions.py | 0
{framework => tests/util}/flow/flow.py | 0
{framework => tests/util}/flow/flow_action_items.py | 0
{framework => tests/util}/flow/flow_items.py | 8 +++-----
{framework => tests/util}/flow/flow_pattern_items.py | 0
{framework => tests/util}/flow/flow_rule.py | 2 +-
{framework => tests/util}/flow/generator.py | 0
tests/util/virt/__init__.py | 2 ++
{framework => tests/util/virt}/virt_base.py | 8 ++++----
{framework => tests/util/virt}/virt_common.py | 8 ++++----
{framework => tests/util/virt}/virt_dut.py | 10 +++++-----
{framework => tests/util/virt}/virt_scene.py | 12 ++++++------
18 files changed, 32 insertions(+), 26 deletions(-)
delete mode 100644 framework/flow/__init__.py
create mode 100644 tests/data/__init__.py
create mode 100644 tests/util/__init__.py
create mode 100644 tests/util/flow/__init__.py
rename {framework => tests/util}/flow/enums.py (100%)
rename {framework => tests/util}/flow/exceptions.py (100%)
rename {framework => tests/util}/flow/flow.py (100%)
rename {framework => tests/util}/flow/flow_action_items.py (100%)
rename {framework => tests/util}/flow/flow_items.py (94%)
rename {framework => tests/util}/flow/flow_pattern_items.py (100%)
rename {framework => tests/util}/flow/flow_rule.py (97%)
rename {framework => tests/util}/flow/generator.py (100%)
create mode 100644 tests/util/virt/__init__.py
rename {framework => tests/util/virt}/virt_base.py (99%)
rename {framework => tests/util/virt}/virt_common.py (92%)
rename {framework => tests/util/virt}/virt_dut.py (98%)
rename {framework => tests/util/virt}/virt_scene.py (98%)
diff --git a/framework/flow/__init__.py b/framework/flow/__init__.py
deleted file mode 100644
index e69de29b..00000000
diff --git a/framework/virt_resource.py b/framework/virt_resource.py
index 36b6fe9c..0e012511 100644
--- a/framework/virt_resource.py
+++ b/framework/virt_resource.py
@@ -30,7 +30,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from random import randint
-from .utils import RED, get_obj_funcs, parallel_lock
+from framework.utils import RED, get_obj_funcs, parallel_lock
INIT_FREE_PORT = 6000
INIT_SERIAL_PORT = 7000
diff --git a/tests/data/__init__.py b/tests/data/__init__.py
new file mode 100644
index 00000000..4ad62931
--- /dev/null
+++ b/tests/data/__init__.py
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2022 University of New Hampshire
diff --git a/tests/util/__init__.py b/tests/util/__init__.py
new file mode 100644
index 00000000..93e83aee
--- /dev/null
+++ b/tests/util/__init__.py
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2022 University of New Hampshire
\ No newline at end of file
diff --git a/tests/util/flow/__init__.py b/tests/util/flow/__init__.py
new file mode 100644
index 00000000..93e83aee
--- /dev/null
+++ b/tests/util/flow/__init__.py
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2022 University of New Hampshire
\ No newline at end of file
diff --git a/framework/flow/enums.py b/tests/util/flow/enums.py
similarity index 100%
rename from framework/flow/enums.py
rename to tests/util/flow/enums.py
diff --git a/framework/flow/exceptions.py b/tests/util/flow/exceptions.py
similarity index 100%
rename from framework/flow/exceptions.py
rename to tests/util/flow/exceptions.py
diff --git a/framework/flow/flow.py b/tests/util/flow/flow.py
similarity index 100%
rename from framework/flow/flow.py
rename to tests/util/flow/flow.py
diff --git a/framework/flow/flow_action_items.py b/tests/util/flow/flow_action_items.py
similarity index 100%
rename from framework/flow/flow_action_items.py
rename to tests/util/flow/flow_action_items.py
diff --git a/framework/flow/flow_items.py b/tests/util/flow/flow_items.py
similarity index 94%
rename from framework/flow/flow_items.py
rename to tests/util/flow/flow_items.py
index e43614c5..35d07008 100644
--- a/framework/flow/flow_items.py
+++ b/tests/util/flow/flow_items.py
@@ -33,9 +33,7 @@
from __future__ import annotations
import copy
-import itertools
-from functools import reduce
-from typing import Any, Dict, FrozenSet, Hashable, Iterable, Set, Tuple, Union
+from typing import Dict, FrozenSet, Iterable, Tuple, Union
from .enums import FlowActionType, FlowItemType
from .exceptions import InvalidFlowItemException
@@ -95,8 +93,8 @@ class FlowItem(object):
raise InvalidFlowItemException(self, other)
elif other.type in self.valid_next_items:
# These imports are in here so there is no circular import
- from framework.flow.flow_action_items import ActionFlowItem
- from framework.flow.flow_pattern_items import PatternFlowItem
+ from tests.util.flow.flow_action_items import ActionFlowItem
+ from tests.util.flow.flow_pattern_items import PatternFlowItem
from .flow import Flow
diff --git a/framework/flow/flow_pattern_items.py b/tests/util/flow/flow_pattern_items.py
similarity index 100%
rename from framework/flow/flow_pattern_items.py
rename to tests/util/flow/flow_pattern_items.py
diff --git a/framework/flow/flow_rule.py b/tests/util/flow/flow_rule.py
similarity index 97%
rename from framework/flow/flow_rule.py
rename to tests/util/flow/flow_rule.py
index 6687bffe..4d4cf487 100644
--- a/framework/flow/flow_rule.py
+++ b/tests/util/flow/flow_rule.py
@@ -32,7 +32,7 @@
from typing import Union
-import framework.flow.flow_action_items as flow_action_items
+import tests.util.flow.flow_action_items as flow_action_items
from .enums import *
from .flow import Flow
diff --git a/framework/flow/generator.py b/tests/util/flow/generator.py
similarity index 100%
rename from framework/flow/generator.py
rename to tests/util/flow/generator.py
diff --git a/tests/util/virt/__init__.py b/tests/util/virt/__init__.py
new file mode 100644
index 00000000..93e83aee
--- /dev/null
+++ b/tests/util/virt/__init__.py
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: BSD-3-Clause
+# Copyright(c) 2022 University of New Hampshire
\ No newline at end of file
diff --git a/framework/virt_base.py b/tests/util/virt/virt_base.py
similarity index 99%
rename from framework/virt_base.py
rename to tests/util/virt/virt_base.py
index d4af8b98..4cc64565 100644
--- a/framework/virt_base.py
+++ b/tests/util/virt/virt_base.py
@@ -37,10 +37,10 @@ from random import randint
import framework.exception as exception
import framework.utils as utils
-from .config import VIRTCONF, VirtConf
-from .dut import Dut
-from .logger import getLogger
-from .settings import CONFIG_ROOT_PATH
+from framework.config import VIRTCONF, VirtConf
+from framework.dut import Dut
+from framework.logger import getLogger
+from framework.settings import CONFIG_ROOT_PATH
from .virt_dut import VirtDut
ST_NOTSTART = "NOTSTART"
diff --git a/framework/virt_common.py b/tests/util/virt/virt_common.py
similarity index 92%
rename from framework/virt_common.py
rename to tests/util/virt/virt_common.py
index eb5ee066..36ea540e 100644
--- a/framework/virt_common.py
+++ b/tests/util/virt/virt_common.py
@@ -30,10 +30,10 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
-from .config import VirtConf
-from .qemu_kvm import QEMUKvm
-from .qemu_libvirt import LibvirtKvm
-from .settings import CONFIG_ROOT_PATH
+from framework.config import VirtConf
+from framework.qemu_kvm import QEMUKvm
+from framework.qemu_libvirt import LibvirtKvm
+from framework.settings import CONFIG_ROOT_PATH
def VM(dut, vm_name, suite_name):
diff --git a/framework/virt_dut.py b/tests/util/virt/virt_dut.py
similarity index 98%
rename from framework/virt_dut.py
rename to tests/util/virt/virt_dut.py
index 369abacf..8bbec12c 100644
--- a/framework/virt_dut.py
+++ b/tests/util/virt/virt_dut.py
@@ -36,11 +36,11 @@ import time
import framework.settings as settings
from nics.net_device import GetNicObj, RemoveNicObj
-from .config import AppNameConf, PortConf
-from .dut import Dut
-from .project_dpdk import DPDKdut
-from .settings import LOG_NAME_SEP, NICS, get_netdev, load_global_setting
-from .utils import RED, parallel_lock
+from framework.config import AppNameConf, PortConf
+from framework.dut import Dut
+from framework.project_dpdk import DPDKdut
+from framework.settings import LOG_NAME_SEP, NICS, get_netdev, load_global_setting
+from framework.utils import RED, parallel_lock
class VirtDut(DPDKdut):
diff --git a/framework/virt_scene.py b/tests/util/virt/virt_scene.py
similarity index 98%
rename from framework/virt_scene.py
rename to tests/util/virt/virt_scene.py
index 63760192..694f84b9 100644
--- a/framework/virt_scene.py
+++ b/tests/util/virt/virt_scene.py
@@ -32,12 +32,12 @@ import time
import framework.utils as utils
-from .config import VIRTCONF, VirtConf
-from .exception import *
-from .pmd_output import PmdOutput
-from .qemu_kvm import QEMUKvm
-from .settings import CONFIG_ROOT_PATH, get_netdev
-from .utils import create_mask
+from framework.config import VIRTCONF, VirtConf
+from framework.exception import *
+from framework.pmd_output import PmdOutput
+from framework.qemu_kvm import QEMUKvm
+from framework.settings import CONFIG_ROOT_PATH, get_netdev
+from framework.utils import create_mask
# scenario module for handling scenario
# 1. load configurations
--
2.30.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] update files depending on tests/util
2022-04-11 17:55 [PATCH v2 1/2] framework: Move test-specific files to test directory ohilyard
@ 2022-04-11 17:55 ` ohilyard
2022-04-11 17:57 ` Owen Hilyard
2022-04-13 7:28 ` Juraj Linkeš
2022-04-13 7:25 ` [PATCH v2 1/2] framework: Move test-specific files to test directory Juraj Linkeš
1 sibling, 2 replies; 7+ messages in thread
From: ohilyard @ 2022-04-11 17:55 UTC (permalink / raw)
To: dts; +Cc: lijuan.tu, juraj.linkes, Owen Hilyard
From: Owen Hilyard <ohilyard@iol.unh.edu>
All of these files imported something that has been moved from
framework/ to tests/util/. Unused imports have been removed as part of
updating the import paths.
Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
---
framework/dut.py | 2 +-
framework/qemu_kvm.py | 4 +--
framework/qemu_libvirt.py | 9 +------
tests/TestSuite_dpdk_gro_lib.py | 2 +-
tests/TestSuite_dpdk_gso_lib.py | 3 +--
tests/TestSuite_floating_veb.py | 5 ----
tests/TestSuite_flow_classify_softnic.py | 24 +++---------------
tests/TestSuite_generic_flow_api.py | 10 --------
tests/TestSuite_iavf.py | 7 ++----
tests/TestSuite_ip_pipeline.py | 25 +++----------------
| 4 ---
tests/TestSuite_kernelpf_iavf.py | 4 +--
tests/TestSuite_mdd.py | 4 +--
tests/TestSuite_pipeline.py | 24 +++---------------
tests/TestSuite_port_control.py | 4 +--
tests/TestSuite_pvp_diff_qemu_version.py | 5 +---
...Suite_pvp_qemu_multi_paths_port_restart.py | 3 +--
tests/TestSuite_pvp_vhost_user_reconnect.py | 2 +-
tests/TestSuite_pvp_virtio_bonding.py | 2 +-
tests/TestSuite_rte_flow.py | 5 +---
...estSuite_runtime_vf_queue_number_kernel.py | 2 +-
tests/TestSuite_sriov_kvm.py | 6 +----
tests/TestSuite_vdev_primary_secondary.py | 2 +-
tests/TestSuite_veb_switch.py | 5 ----
tests/TestSuite_vf_interrupt_pmd.py | 6 +----
tests/TestSuite_vf_jumboframe.py | 5 +---
tests/TestSuite_vf_macfilter.py | 3 +--
tests/TestSuite_vf_offload.py | 7 +-----
tests/TestSuite_vf_packet_rxtx.py | 3 +--
tests/TestSuite_vf_port_start_stop.py | 3 +--
| 2 +-
tests/TestSuite_vf_to_vf_nic_bridge.py | 3 +--
tests/TestSuite_vf_vlan.py | 4 +--
tests/TestSuite_vhost_event_idx_interrupt.py | 3 +--
tests/TestSuite_vhost_multi_queue_qemu.py | 2 +-
tests/TestSuite_vhost_user_live_migration.py | 3 +--
tests/TestSuite_vhost_virtio_pmd_interrupt.py | 2 +-
tests/TestSuite_virtio_event_idx_interrupt.py | 3 +--
tests/TestSuite_virtio_pvp_regression.py | 3 +--
tests/TestSuite_vm2vm_virtio_net_perf.py | 2 +-
tests/TestSuite_vm2vm_virtio_pmd.py | 2 +-
tests/TestSuite_vswitch_sample_cbdma.py | 2 +-
42 files changed, 49 insertions(+), 172 deletions(-)
diff --git a/framework/dut.py b/framework/dut.py
index a2a93734..d6b8d34a 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -46,7 +46,7 @@ from .settings import LOG_NAME_SEP, NICS
from .ssh_connection import SSHConnection
from .test_result import ResultTable
from .utils import RED, remove_old_rsa_key
-from .virt_resource import VirtResource
+from framework.virt_resource import VirtResource
class Dut(Crb):
diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
index 5615263b..8d5f2924 100644
--- a/framework/qemu_kvm.py
+++ b/framework/qemu_kvm.py
@@ -35,9 +35,9 @@ import re
import time
from .exception import StartVMFailedException
-from .settings import DTS_PARALLEL_SETTING, get_host_ip, load_global_setting
+from .settings import get_host_ip
from .utils import RED, parallel_lock
-from .virt_base import ST_NOTSTART, ST_PAUSE, ST_RUNNING, ST_UNKNOWN, VirtBase
+from tests.util.virt.virt_base import ST_NOTSTART, ST_PAUSE, ST_RUNNING, ST_UNKNOWN, VirtBase
# This name is directly defined in the qemu guest service
# So you can not change it except it is changed by the service
diff --git a/framework/qemu_libvirt.py b/framework/qemu_libvirt.py
index 740b7bbc..88d7dce9 100644
--- a/framework/qemu_libvirt.py
+++ b/framework/qemu_libvirt.py
@@ -36,15 +36,8 @@ import xml.etree.ElementTree as ET
from xml.dom import minidom
from xml.etree.ElementTree import ElementTree
-import framework.utils as utils
-
-from .config import VIRTCONF, VirtConf
-from .dut import Dut
from .exception import StartVMFailedException
-from .logger import getLogger
-from .ssh_connection import SSHConnection
-from .virt_base import VirtBase
-from .virt_resource import VirtResource
+from tests.util.virt.virt_base import VirtBase
class LibvirtKvm(VirtBase):
diff --git a/tests/TestSuite_dpdk_gro_lib.py b/tests/TestSuite_dpdk_gro_lib.py
index e19b3695..87af21ca 100644
--- a/tests/TestSuite_dpdk_gro_lib.py
+++ b/tests/TestSuite_dpdk_gro_lib.py
@@ -42,7 +42,7 @@ import time
import framework.utils as utils
import tests.vhost_peer_conf as peer
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestDPDKGROLib(TestCase):
diff --git a/tests/TestSuite_dpdk_gso_lib.py b/tests/TestSuite_dpdk_gso_lib.py
index 25293643..6b7c86f1 100644
--- a/tests/TestSuite_dpdk_gso_lib.py
+++ b/tests/TestSuite_dpdk_gso_lib.py
@@ -41,9 +41,8 @@ import time
import framework.utils as utils
import tests.vhost_peer_conf as peer
-from framework.config import UserConf
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestDPDKGsoLib(TestCase):
diff --git a/tests/TestSuite_floating_veb.py b/tests/TestSuite_floating_veb.py
index c3c0f83c..3d2e44eb 100644
--- a/tests/TestSuite_floating_veb.py
+++ b/tests/TestSuite_floating_veb.py
@@ -38,14 +38,9 @@ Test Floating VEB Features by Poll Mode Drivers.
import re
import time
-from framework.dut import Dut
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.project_dpdk import DPDKdut
-from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.utils import RED
-from framework.virt_dut import VirtDut
class TestFloatingVEBSwitching(TestCase):
diff --git a/tests/TestSuite_flow_classify_softnic.py b/tests/TestSuite_flow_classify_softnic.py
index 14042d18..d0f35b82 100644
--- a/tests/TestSuite_flow_classify_softnic.py
+++ b/tests/TestSuite_flow_classify_softnic.py
@@ -29,33 +29,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import os
-import random
import re
import time
from time import sleep
-import scapy.layers.inet
-from scapy.arch import get_if_hwaddr
-from scapy.layers.inet import ICMP, IP, TCP, UDP, Ether
+from scapy.layers.inet import IP, TCP, UDP, Ether
from scapy.layers.inet6 import IPv6
-from scapy.layers.l2 import ARP, GRE, Dot1Q
-from scapy.layers.sctp import SCTP, SCTPChunkData
-from scapy.packet import Raw, bind_layers
-from scapy.route import *
-from scapy.sendrecv import sendp, sniff
-from scapy.utils import hexstr, rdpcap, wrpcap
-
-import framework.utils as utils
-from framework.crb import Crb
-from framework.dut import Dut
-from framework.exception import VerifyFailure
-from framework.packet import Packet
+from scapy.layers.sctp import SCTP
+from scapy.utils import rdpcap, wrpcap
+
from framework.pmd_output import PmdOutput
-from framework.project_dpdk import DPDKdut
-from framework.settings import DRIVERS, HEADER_SIZE
from framework.test_case import TestCase
-from framework.virt_dut import VirtDut
class TestFlowClassifySoftnic(TestCase):
diff --git a/tests/TestSuite_generic_flow_api.py b/tests/TestSuite_generic_flow_api.py
index a87f3f8b..998edc46 100644
--- a/tests/TestSuite_generic_flow_api.py
+++ b/tests/TestSuite_generic_flow_api.py
@@ -36,24 +36,14 @@ Test the support of generic flow API by Poll Mode Drivers.
"""
-import os
import random
import re
import time
-import scapy.layers.inet
-from scapy.utils import rdpcap
-
import framework.packet as packet
import framework.utils as utils
-from framework.crb import Crb
-from framework.dut import Dut
-from framework.exception import VerifyFailure
from framework.pmd_output import PmdOutput
-from framework.project_dpdk import DPDKdut
-from framework.settings import DRIVERS, HEADER_SIZE
from framework.test_case import TestCase, check_supported_nic
-from framework.virt_dut import VirtDut
MAX_VLAN = 4095
MAX_QUEUE = 15
diff --git a/tests/TestSuite_iavf.py b/tests/TestSuite_iavf.py
index d52996d2..15dfba08 100644
--- a/tests/TestSuite_iavf.py
+++ b/tests/TestSuite_iavf.py
@@ -36,16 +36,13 @@ Test some iavf function in i40e driver
"""
-import math
-import random
import re
import time
-from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.settings import HEADER_SIZE, get_nic_name
+from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "Default"
diff --git a/tests/TestSuite_ip_pipeline.py b/tests/TestSuite_ip_pipeline.py
index e5720e74..efed9672 100644
--- a/tests/TestSuite_ip_pipeline.py
+++ b/tests/TestSuite_ip_pipeline.py
@@ -29,34 +29,17 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import os
-import random
import re
import time
from time import sleep
-import scapy.layers.inet
-from scapy.arch import get_if_hwaddr
-from scapy.layers.inet import ICMP, IP, TCP, UDP, Ether
-from scapy.layers.l2 import ARP, GRE, Dot1Q
-from scapy.layers.sctp import SCTP, SCTPChunkData
-from scapy.packet import Raw, bind_layers
-from scapy.route import *
-from scapy.sendrecv import sendp, sniff
+from scapy.layers.inet import IP, TCP, Ether
+from scapy.packet import Raw
# from scapy.all import conf
-from scapy.utils import hexstr, rdpcap, wrpcap
-
-import framework.utils as utils
-from framework.crb import Crb
-from framework.dut import Dut
-from framework.exception import VerifyFailure
-from framework.packet import Packet
-from framework.pmd_output import PmdOutput
-from framework.project_dpdk import DPDKdut
-from framework.settings import DRIVERS, HEADER_SIZE
+from scapy.utils import rdpcap, wrpcap
+
from framework.test_case import TestCase
-from framework.virt_dut import VirtDut
class TestIPPipeline(TestCase):
--git a/tests/TestSuite_ixgbe_vf_get_extra_queue_information.py b/tests/TestSuite_ixgbe_vf_get_extra_queue_information.py
index 0e64a5d6..4bab553e 100644
--- a/tests/TestSuite_ixgbe_vf_get_extra_queue_information.py
+++ b/tests/TestSuite_ixgbe_vf_get_extra_queue_information.py
@@ -33,18 +33,14 @@
DPDK Test suite.
Test Niantic ixgbe_get_vf_queue Include Extra Information function.
"""
-import random
-import re
import time
-import framework.utils as utils
from framework.pmd_output import PmdOutput
from framework.qemu_kvm import QEMUKvm
# Use scapy to send packets with different source and dest ip.
# and collect the hash result of five tuple and the queue id.
from framework.test_case import TestCase
-from framework.virt_common import VM
class TestIxgbeVfGetExtraInfo(TestCase):
diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py
index 3c8e5929..55e40630 100644
--- a/tests/TestSuite_kernelpf_iavf.py
+++ b/tests/TestSuite_kernelpf_iavf.py
@@ -44,10 +44,8 @@ import time
import framework.utils as utils
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.utils import RED
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
MAX_VLAN = 4095
diff --git a/tests/TestSuite_mdd.py b/tests/TestSuite_mdd.py
index dc28b9fe..43049974 100644
--- a/tests/TestSuite_mdd.py
+++ b/tests/TestSuite_mdd.py
@@ -34,14 +34,12 @@ DPDK Test suite.
Test the support of Malicious Driver Detection
"""
-
-import re
import time
from framework.packet import Packet
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
send_pks_num = 2000
diff --git a/tests/TestSuite_pipeline.py b/tests/TestSuite_pipeline.py
index c13bd714..b36d62e9 100644
--- a/tests/TestSuite_pipeline.py
+++ b/tests/TestSuite_pipeline.py
@@ -31,34 +31,18 @@
import itertools
import os
-import random
import re
import socket
import time
from time import sleep
-import scapy.layers.inet
-from scapy.arch import get_if_hwaddr
-from scapy.layers.inet import ICMP, IP, TCP, UDP, Ether
-from scapy.layers.l2 import ARP, GRE, Dot1Q
-from scapy.layers.sctp import SCTP, SCTPChunkData
-from scapy.packet import Raw, bind_layers
-from scapy.route import *
-from scapy.sendrecv import sendp, sniff
+from scapy.layers.inet import IP, TCP, Ether
+from scapy.packet import Raw
# from scapy.all import conf
-from scapy.utils import hexstr, rdpcap, wrpcap
-
-import framework.utils as utils
-from framework.crb import Crb
-from framework.dut import Dut
-from framework.exception import VerifyFailure
-from framework.packet import Packet
-from framework.pmd_output import PmdOutput
-from framework.project_dpdk import DPDKdut
-from framework.settings import DRIVERS, HEADER_SIZE
+from scapy.utils import rdpcap, wrpcap
+
from framework.test_case import TestCase
-from framework.virt_dut import VirtDut
TIMESTAMP = re.compile(r"\d{2}\:\d{2}\:\d{2}\.\d{6}")
PAYLOAD = re.compile(r"\t0x([0-9a-fA-F]+): ([0-9a-fA-F ]+)")
diff --git a/tests/TestSuite_port_control.py b/tests/TestSuite_port_control.py
index 8055b776..fce2c523 100755
--- a/tests/TestSuite_port_control.py
+++ b/tests/TestSuite_port_control.py
@@ -29,15 +29,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import os
import re
import time
import framework.packet as packet
-import framework.utils as utils
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestPortControl(TestCase):
diff --git a/tests/TestSuite_pvp_diff_qemu_version.py b/tests/TestSuite_pvp_diff_qemu_version.py
index b1fb18ae..eac63a63 100644
--- a/tests/TestSuite_pvp_diff_qemu_version.py
+++ b/tests/TestSuite_pvp_diff_qemu_version.py
@@ -41,13 +41,10 @@ qemu =
import re
import time
-from scapy.utils import wrpcap
-
-import framework.utils as utils
from framework.pktgen import PacketGeneratorHelper
from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVhostPVPDiffQemuVersion(TestCase):
diff --git a/tests/TestSuite_pvp_qemu_multi_paths_port_restart.py b/tests/TestSuite_pvp_qemu_multi_paths_port_restart.py
index 0a5dcdd2..855d4251 100644
--- a/tests/TestSuite_pvp_qemu_multi_paths_port_restart.py
+++ b/tests/TestSuite_pvp_qemu_multi_paths_port_restart.py
@@ -41,11 +41,10 @@ port restart test with each path
import re
import time
-import framework.utils as utils
from framework.packet import Packet
from framework.pktgen import PacketGeneratorHelper
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestPVPQemuMultiPathPortRestart(TestCase):
diff --git a/tests/TestSuite_pvp_vhost_user_reconnect.py b/tests/TestSuite_pvp_vhost_user_reconnect.py
index 327444fb..ec494106 100644
--- a/tests/TestSuite_pvp_vhost_user_reconnect.py
+++ b/tests/TestSuite_pvp_vhost_user_reconnect.py
@@ -43,7 +43,7 @@ import framework.utils as utils
from framework.packet import Packet
from framework.pktgen import PacketGeneratorHelper
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestPVPVhostUserReconnect(TestCase):
diff --git a/tests/TestSuite_pvp_virtio_bonding.py b/tests/TestSuite_pvp_virtio_bonding.py
index 3565882e..e009a819 100644
--- a/tests/TestSuite_pvp_virtio_bonding.py
+++ b/tests/TestSuite_pvp_virtio_bonding.py
@@ -42,7 +42,7 @@ from framework.packet import Packet
from framework.pktgen import PacketGeneratorHelper
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestPVPVirtIOBonding(TestCase):
diff --git a/tests/TestSuite_rte_flow.py b/tests/TestSuite_rte_flow.py
index b8d41540..237a2559 100644
--- a/tests/TestSuite_rte_flow.py
+++ b/tests/TestSuite_rte_flow.py
@@ -34,12 +34,9 @@
DPDK Test suite.
MTU Checks example.
"""
-import ipaddress
-import time
from typing import Callable
-import framework.utils as utils
-from framework.flow import generator
+from tests.util.flow import generator
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
diff --git a/tests/TestSuite_runtime_vf_queue_number_kernel.py b/tests/TestSuite_runtime_vf_queue_number_kernel.py
index e8f9f5c9..16101c98 100755
--- a/tests/TestSuite_runtime_vf_queue_number_kernel.py
+++ b/tests/TestSuite_runtime_vf_queue_number_kernel.py
@@ -41,7 +41,7 @@ import framework.utils as utils
from framework.packet import Packet
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
diff --git a/tests/TestSuite_sriov_kvm.py b/tests/TestSuite_sriov_kvm.py
index c2ce2259..245eca70 100644
--- a/tests/TestSuite_sriov_kvm.py
+++ b/tests/TestSuite_sriov_kvm.py
@@ -37,15 +37,11 @@ Test userland 10Gb PMD.
"""
-import pdb
-import random
-import re
import time
from framework.pmd_output import PmdOutput
-from framework.settings import PROTOCOL_PACKET_SIZE
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
FRAME_SIZE_64 = 64
VM_CORES_MASK = "all"
diff --git a/tests/TestSuite_vdev_primary_secondary.py b/tests/TestSuite_vdev_primary_secondary.py
index 7f054cda..2bfe862b 100644
--- a/tests/TestSuite_vdev_primary_secondary.py
+++ b/tests/TestSuite_vdev_primary_secondary.py
@@ -46,7 +46,7 @@ import time
import framework.utils as utils
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVdevPrimarySecondary(TestCase):
diff --git a/tests/TestSuite_veb_switch.py b/tests/TestSuite_veb_switch.py
index 7b91fee3..5fd5526e 100644
--- a/tests/TestSuite_veb_switch.py
+++ b/tests/TestSuite_veb_switch.py
@@ -39,14 +39,9 @@ import re
import time
import framework.utils as utils
-from framework.dut import Dut
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.project_dpdk import DPDKdut
-from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.utils import RED
-from framework.virt_dut import VirtDut
class TestVEBSwitching(TestCase):
diff --git a/tests/TestSuite_vf_interrupt_pmd.py b/tests/TestSuite_vf_interrupt_pmd.py
index d0b02b12..a4d6020f 100644
--- a/tests/TestSuite_vf_interrupt_pmd.py
+++ b/tests/TestSuite_vf_interrupt_pmd.py
@@ -35,14 +35,10 @@ DPDK Test suite.
Test vf_interrupt_pmd.
"""
-import pdb
-import re
-import time
-
import framework.utils as utils
from framework.packet import Packet
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVfInterruptPmd(TestCase):
diff --git a/tests/TestSuite_vf_jumboframe.py b/tests/TestSuite_vf_jumboframe.py
index 2245a92e..0fb15a3f 100644
--- a/tests/TestSuite_vf_jumboframe.py
+++ b/tests/TestSuite_vf_jumboframe.py
@@ -29,16 +29,13 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import re
import time
import framework.utils as utils
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.utils import RED
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
diff --git a/tests/TestSuite_vf_macfilter.py b/tests/TestSuite_vf_macfilter.py
index 5351cb68..2e4d08b4 100644
--- a/tests/TestSuite_vf_macfilter.py
+++ b/tests/TestSuite_vf_macfilter.py
@@ -29,12 +29,11 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import re
import time
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
diff --git a/tests/TestSuite_vf_offload.py b/tests/TestSuite_vf_offload.py
index dff1a1b9..ff01e2ad 100644
--- a/tests/TestSuite_vf_offload.py
+++ b/tests/TestSuite_vf_offload.py
@@ -30,17 +30,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import re
-import string
import time
import framework.utils as utils
-from framework.crb import Crb
from framework.pmd_output import PmdOutput
-from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.utils import GREEN, RED
-from framework.virt_common import VM
-from nics.net_device import NetDevice
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
DEFAULT_MTU = 1500
diff --git a/tests/TestSuite_vf_packet_rxtx.py b/tests/TestSuite_vf_packet_rxtx.py
index ea000c83..d3597013 100644
--- a/tests/TestSuite_vf_packet_rxtx.py
+++ b/tests/TestSuite_vf_packet_rxtx.py
@@ -29,13 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import re
import time
from framework.packet import Packet
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
diff --git a/tests/TestSuite_vf_port_start_stop.py b/tests/TestSuite_vf_port_start_stop.py
index 5192653d..eebf68ac 100644
--- a/tests/TestSuite_vf_port_start_stop.py
+++ b/tests/TestSuite_vf_port_start_stop.py
@@ -29,13 +29,12 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import re
import time
from framework.packet import Packet
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
--git a/tests/TestSuite_vf_rss.py b/tests/TestSuite_vf_rss.py
index b8bf65a5..150d658a 100644
--- a/tests/TestSuite_vf_rss.py
+++ b/tests/TestSuite_vf_rss.py
@@ -46,7 +46,7 @@ from framework.pmd_output import PmdOutput
# Use scapy to send packets with different source and dest ip.
# and collect the hash result of five tuple and the queue id.
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVfRss(TestCase):
diff --git a/tests/TestSuite_vf_to_vf_nic_bridge.py b/tests/TestSuite_vf_to_vf_nic_bridge.py
index f9b5b9ab..f46a65ad 100644
--- a/tests/TestSuite_vf_to_vf_nic_bridge.py
+++ b/tests/TestSuite_vf_to_vf_nic_bridge.py
@@ -33,14 +33,13 @@ DPDK Test suite
Test vf to vf nic bridge
"""
-import pdb
import re
import time
import framework.utils as utils
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VF_NUMS_ON_ONE_PF = 2
VF_TEMP_MAC = "52:54:12:45:67:1%d"
diff --git a/tests/TestSuite_vf_vlan.py b/tests/TestSuite_vf_vlan.py
index d4cf29b3..e80531e3 100644
--- a/tests/TestSuite_vf_vlan.py
+++ b/tests/TestSuite_vf_vlan.py
@@ -30,14 +30,12 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import random
-import re
import time
from framework.packet import Packet
from framework.pmd_output import PmdOutput
-from framework.settings import get_nic_name
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
VM_CORES_MASK = "all"
MAX_VLAN = 4095
diff --git a/tests/TestSuite_vhost_event_idx_interrupt.py b/tests/TestSuite_vhost_event_idx_interrupt.py
index f01465f1..65001305 100644
--- a/tests/TestSuite_vhost_event_idx_interrupt.py
+++ b/tests/TestSuite_vhost_event_idx_interrupt.py
@@ -37,9 +37,8 @@ Vhost event idx interrupt need test with l3fwd-power sample
import re
import time
-import framework.utils as utils
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVhostEventIdxInterrupt(TestCase):
diff --git a/tests/TestSuite_vhost_multi_queue_qemu.py b/tests/TestSuite_vhost_multi_queue_qemu.py
index 6359bfc8..f17daf70 100644
--- a/tests/TestSuite_vhost_multi_queue_qemu.py
+++ b/tests/TestSuite_vhost_multi_queue_qemu.py
@@ -43,7 +43,7 @@ from framework.pktgen import PacketGeneratorHelper
from framework.pmd_output import PmdOutput
from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVhostMultiQueueQemu(TestCase):
diff --git a/tests/TestSuite_vhost_user_live_migration.py b/tests/TestSuite_vhost_user_live_migration.py
index a5e72672..8ac41973 100644
--- a/tests/TestSuite_vhost_user_live_migration.py
+++ b/tests/TestSuite_vhost_user_live_migration.py
@@ -32,12 +32,11 @@ import os.path
import re
import time
-import framework.utils as utils
from framework.config import UserConf
from framework.exception import VirtDutInitException
from framework.settings import CONFIG_ROOT_PATH
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVhostUserLiveMigration(TestCase):
diff --git a/tests/TestSuite_vhost_virtio_pmd_interrupt.py b/tests/TestSuite_vhost_virtio_pmd_interrupt.py
index e541b5e3..51ad0154 100644
--- a/tests/TestSuite_vhost_virtio_pmd_interrupt.py
+++ b/tests/TestSuite_vhost_virtio_pmd_interrupt.py
@@ -41,7 +41,7 @@ import framework.utils as utils
from framework.packet import Packet
from framework.pktgen import PacketGeneratorHelper
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVhostVirtioPmdInterrupt(TestCase):
diff --git a/tests/TestSuite_virtio_event_idx_interrupt.py b/tests/TestSuite_virtio_event_idx_interrupt.py
index 2429887b..2ef56fac 100644
--- a/tests/TestSuite_virtio_event_idx_interrupt.py
+++ b/tests/TestSuite_virtio_event_idx_interrupt.py
@@ -38,10 +38,9 @@ import _thread
import re
import time
-import framework.utils as utils
from framework.pktgen import PacketGeneratorHelper
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVirtioIdxInterrupt(TestCase):
diff --git a/tests/TestSuite_virtio_pvp_regression.py b/tests/TestSuite_virtio_pvp_regression.py
index 9d7fe197..3ea0aef7 100644
--- a/tests/TestSuite_virtio_pvp_regression.py
+++ b/tests/TestSuite_virtio_pvp_regression.py
@@ -44,11 +44,10 @@ qemu =
import re
import time
-import framework.utils as utils
from framework.pktgen import PacketGeneratorHelper
from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVirtioPVPRegression(TestCase):
diff --git a/tests/TestSuite_vm2vm_virtio_net_perf.py b/tests/TestSuite_vm2vm_virtio_net_perf.py
index 486f1acf..3b107368 100644
--- a/tests/TestSuite_vm2vm_virtio_net_perf.py
+++ b/tests/TestSuite_vm2vm_virtio_net_perf.py
@@ -46,7 +46,7 @@ import time
import framework.utils as utils
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVM2VMVirtioNetPerf(TestCase):
diff --git a/tests/TestSuite_vm2vm_virtio_pmd.py b/tests/TestSuite_vm2vm_virtio_pmd.py
index 9460c5fa..e208c87c 100644
--- a/tests/TestSuite_vm2vm_virtio_pmd.py
+++ b/tests/TestSuite_vm2vm_virtio_pmd.py
@@ -45,7 +45,7 @@ import framework.utils as utils
from framework.packet import Packet
from framework.pmd_output import PmdOutput
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVM2VMVirtioPMD(TestCase):
diff --git a/tests/TestSuite_vswitch_sample_cbdma.py b/tests/TestSuite_vswitch_sample_cbdma.py
index 503c8ba0..5fa901f7 100644
--- a/tests/TestSuite_vswitch_sample_cbdma.py
+++ b/tests/TestSuite_vswitch_sample_cbdma.py
@@ -45,7 +45,7 @@ from framework.pktgen import PacketGeneratorHelper
from framework.pmd_output import PmdOutput
from framework.settings import HEADER_SIZE
from framework.test_case import TestCase
-from framework.virt_common import VM
+from tests.util.virt.virt_common import VM
class TestVswitchSampleCBDMA(TestCase):
--
2.30.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] update files depending on tests/util
2022-04-11 17:55 ` [PATCH v2 2/2] update files depending on tests/util ohilyard
@ 2022-04-11 17:57 ` Owen Hilyard
2022-04-13 7:28 ` Juraj Linkeš
1 sibling, 0 replies; 7+ messages in thread
From: Owen Hilyard @ 2022-04-11 17:57 UTC (permalink / raw)
To: dts; +Cc: Tu, Lijuan, Juraj Linkeš
[-- Attachment #1: Type: text/plain, Size: 94 bytes --]
Sorry about that, it looks like I missed the second commit when I sent it
out the first time.
[-- Attachment #2: Type: text/html, Size: 139 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v2 1/2] framework: Move test-specific files to test directory
2022-04-11 17:55 [PATCH v2 1/2] framework: Move test-specific files to test directory ohilyard
2022-04-11 17:55 ` [PATCH v2 2/2] update files depending on tests/util ohilyard
@ 2022-04-13 7:25 ` Juraj Linkeš
2022-04-13 12:50 ` Owen Hilyard
1 sibling, 1 reply; 7+ messages in thread
From: Juraj Linkeš @ 2022-04-13 7:25 UTC (permalink / raw)
To: ohilyard, dts; +Cc: lijuan.tu
> ---
> framework/flow/__init__.py | 0
> framework/virt_resource.py | 2 +-
> tests/data/__init__.py | 2 ++
> tests/util/__init__.py | 2 ++
> tests/util/flow/__init__.py | 2 ++
> {framework => tests/util}/flow/enums.py | 0
> {framework => tests/util}/flow/exceptions.py | 0
> {framework => tests/util}/flow/flow.py | 0
> {framework => tests/util}/flow/flow_action_items.py | 0
> {framework => tests/util}/flow/flow_items.py | 8 +++-----
> {framework => tests/util}/flow/flow_pattern_items.py | 0
> {framework => tests/util}/flow/flow_rule.py | 2 +-
> {framework => tests/util}/flow/generator.py | 0
> tests/util/virt/__init__.py | 2 ++
> {framework => tests/util/virt}/virt_base.py | 8 ++++----
> {framework => tests/util/virt}/virt_common.py | 8 ++++----
> {framework => tests/util/virt}/virt_dut.py | 10 +++++-----
> {framework => tests/util/virt}/virt_scene.py | 12 ++++++------
As Lijian Mentioned, we should also move qemu_kvm and qemu_libvirt. As far as I can tell, the only virt file that needs to stay is virt_resource and all of the rest (including qemu) can be moved.
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [PATCH v2 2/2] update files depending on tests/util
2022-04-11 17:55 ` [PATCH v2 2/2] update files depending on tests/util ohilyard
2022-04-11 17:57 ` Owen Hilyard
@ 2022-04-13 7:28 ` Juraj Linkeš
2022-04-13 12:50 ` Owen Hilyard
1 sibling, 1 reply; 7+ messages in thread
From: Juraj Linkeš @ 2022-04-13 7:28 UTC (permalink / raw)
To: ohilyard, dts; +Cc: lijuan.tu
> diff --git a/framework/dut.py b/framework/dut.py index a2a93734..d6b8d34a
> 100644
> --- a/framework/dut.py
> +++ b/framework/dut.py
> @@ -46,7 +46,7 @@ from .settings import LOG_NAME_SEP, NICS from
> .ssh_connection import SSHConnection from .test_result import ResultTable
> from .utils import RED, remove_old_rsa_key -from .virt_resource import
> VirtResource
> +from framework.virt_resource import VirtResource
>
A minor point, this is an unneccesary change that violates the current convention. Is this a result of automated tools?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] update files depending on tests/util
2022-04-13 7:28 ` Juraj Linkeš
@ 2022-04-13 12:50 ` Owen Hilyard
0 siblings, 0 replies; 7+ messages in thread
From: Owen Hilyard @ 2022-04-13 12:50 UTC (permalink / raw)
To: Juraj Linkeš; +Cc: dts, lijuan.tu
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
Yes, that is a result of the automatic refactoring by Pycharm. I'll clean
that up when I resubmit.
On Wed, Apr 13, 2022 at 3:28 AM Juraj Linkeš <juraj.linkes@pantheon.tech>
wrote:
> > diff --git a/framework/dut.py b/framework/dut.py index a2a93734..d6b8d34a
> > 100644
> > --- a/framework/dut.py
> > +++ b/framework/dut.py
> > @@ -46,7 +46,7 @@ from .settings import LOG_NAME_SEP, NICS from
> > .ssh_connection import SSHConnection from .test_result import
> ResultTable
> > from .utils import RED, remove_old_rsa_key -from .virt_resource import
> > VirtResource
> > +from framework.virt_resource import VirtResource
> >
>
> A minor point, this is an unneccesary change that violates the current
> convention. Is this a result of automated tools?
>
>
[-- Attachment #2: Type: text/html, Size: 1068 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] framework: Move test-specific files to test directory
2022-04-13 7:25 ` [PATCH v2 1/2] framework: Move test-specific files to test directory Juraj Linkeš
@ 2022-04-13 12:50 ` Owen Hilyard
0 siblings, 0 replies; 7+ messages in thread
From: Owen Hilyard @ 2022-04-13 12:50 UTC (permalink / raw)
To: Juraj Linkeš; +Cc: dts, lijuan.tu
[-- Attachment #1: Type: text/plain, Size: 1564 bytes --]
My bad, I'll move those in V3.
On Wed, Apr 13, 2022 at 3:25 AM Juraj Linkeš <juraj.linkes@pantheon.tech>
wrote:
> > ---
> > framework/flow/__init__.py | 0
> > framework/virt_resource.py | 2 +-
> > tests/data/__init__.py | 2 ++
> > tests/util/__init__.py | 2 ++
> > tests/util/flow/__init__.py | 2 ++
> > {framework => tests/util}/flow/enums.py | 0
> > {framework => tests/util}/flow/exceptions.py | 0
> > {framework => tests/util}/flow/flow.py | 0
> > {framework => tests/util}/flow/flow_action_items.py | 0
> > {framework => tests/util}/flow/flow_items.py | 8 +++-----
> > {framework => tests/util}/flow/flow_pattern_items.py | 0
> > {framework => tests/util}/flow/flow_rule.py | 2 +-
> > {framework => tests/util}/flow/generator.py | 0
> > tests/util/virt/__init__.py | 2 ++
> > {framework => tests/util/virt}/virt_base.py | 8 ++++----
> > {framework => tests/util/virt}/virt_common.py | 8 ++++----
> > {framework => tests/util/virt}/virt_dut.py | 10 +++++-----
> > {framework => tests/util/virt}/virt_scene.py | 12 ++++++------
>
> As Lijian Mentioned, we should also move qemu_kvm and qemu_libvirt. As far
> as I can tell, the only virt file that needs to stay is virt_resource and
> all of the rest (including qemu) can be moved.
>
>
[-- Attachment #2: Type: text/html, Size: 2109 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-04-13 12:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-11 17:55 [PATCH v2 1/2] framework: Move test-specific files to test directory ohilyard
2022-04-11 17:55 ` [PATCH v2 2/2] update files depending on tests/util ohilyard
2022-04-11 17:57 ` Owen Hilyard
2022-04-13 7:28 ` Juraj Linkeš
2022-04-13 12:50 ` Owen Hilyard
2022-04-13 7:25 ` [PATCH v2 1/2] framework: Move test-specific files to test directory Juraj Linkeš
2022-04-13 12:50 ` Owen Hilyard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).