From: Noa Osherovich <noaos@mellanox.com>
To: dledford@redhat.com, jgg@mellanox.com, leonro@mellanox.com
Cc: linux-rdma@vger.kernel.org, Noa Osherovich <noaos@mellanox.com>
Subject: [PATCH rdma-core 02/14] pyverbs: Move tests to a stand-alone directory
Date: Mon, 19 Aug 2019 09:58:15 +0300 [thread overview]
Message-ID: <20190819065827.26921-3-noaos@mellanox.com> (raw)
In-Reply-To: <20190819065827.26921-1-noaos@mellanox.com>
Unittests can be added regardless of pyverbs, change the directory
hierarchy to reflect that.
Signed-off-by: Noa Osherovich <noaos@mellanox.com>
---
tests/CMakeLists.txt | 14 ++++++++++++++
{pyverbs/tests => tests}/__init__.py | 0
{pyverbs/tests => tests}/base.py | 0
pyverbs/tests/addr.py => tests/test_addr.py | 2 +-
pyverbs/tests/cq.py => tests/test_cq.py | 4 ++--
pyverbs/tests/device.py => tests/test_device.py | 4 ++--
pyverbs/tests/mr.py => tests/test_mr.py | 4 ++--
pyverbs/tests/pd.py => tests/test_pd.py | 2 +-
pyverbs/tests/qp.py => tests/test_qp.py | 4 ++--
{pyverbs/tests => tests}/utils.py | 0
10 files changed, 24 insertions(+), 10 deletions(-)
create mode 100644 tests/CMakeLists.txt
rename {pyverbs/tests => tests}/__init__.py (100%)
rename {pyverbs/tests => tests}/base.py (100%)
rename pyverbs/tests/addr.py => tests/test_addr.py (98%)
rename pyverbs/tests/cq.py => tests/test_cq.py (98%)
rename pyverbs/tests/device.py => tests/test_device.py (99%)
rename pyverbs/tests/mr.py => tests/test_mr.py (99%)
rename pyverbs/tests/pd.py => tests/test_pd.py (97%)
rename pyverbs/tests/qp.py => tests/test_qp.py (99%)
rename {pyverbs/tests => tests}/utils.py (100%)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
new file mode 100644
index 000000000000..f1ba542fab90
--- /dev/null
+++ b/tests/CMakeLists.txt
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB)
+# Copyright (c) 2019, Mellanox Technologies. All rights reserved. See COPYING file
+
+rdma_python_test(tests
+ __init__.py
+ test_addr.py
+ base.py
+ test_cq.py
+ test_device.py
+ test_mr.py
+ test_pd.py
+ test_qp.py
+ utils.py
+ )
diff --git a/pyverbs/tests/__init__.py b/tests/__init__.py
similarity index 100%
rename from pyverbs/tests/__init__.py
rename to tests/__init__.py
diff --git a/pyverbs/tests/base.py b/tests/base.py
similarity index 100%
rename from pyverbs/tests/base.py
rename to tests/base.py
diff --git a/pyverbs/tests/addr.py b/tests/test_addr.py
similarity index 98%
rename from pyverbs/tests/addr.py
rename to tests/test_addr.py
index 1c56f56bd0bd..9cc801226e69 100644
--- a/pyverbs/tests/addr.py
+++ b/tests/test_addr.py
@@ -1,9 +1,9 @@
# SPDX-License-Identifier: (GPL-2.0 OR Linux-OpenIB)
# Copyright (c) 2019 Mellanox Technologies, Inc. All rights reserved. See COPYING file
-from pyverbs.tests.base import PyverbsAPITestCase
from pyverbs.addr import GlobalRoute, AHAttr, AH
from pyverbs.pyverbs_error import PyverbsError
+from tests.base import PyverbsAPITestCase
import pyverbs.device as d
import pyverbs.enums as e
from pyverbs.pd import PD
diff --git a/pyverbs/tests/cq.py b/tests/test_cq.py
similarity index 98%
rename from pyverbs/tests/cq.py
rename to tests/test_cq.py
index e1e56d363011..7848f39c9c63 100644
--- a/pyverbs/tests/cq.py
+++ b/tests/test_cq.py
@@ -7,9 +7,9 @@ import random
from pyverbs.cq import CompChannel, CQ, CqInitAttrEx, CQEX
from pyverbs.pyverbs_error import PyverbsError
-from pyverbs.tests.base import PyverbsAPITestCase
-import pyverbs.tests.utils as u
+from tests.base import PyverbsAPITestCase
import pyverbs.enums as e
+import tests.utils as u
class CQTest(PyverbsAPITestCase):
diff --git a/pyverbs/tests/device.py b/tests/test_device.py
similarity index 99%
rename from pyverbs/tests/device.py
rename to tests/test_device.py
index 63f195156119..e395e793c28f 100644
--- a/pyverbs/tests/device.py
+++ b/tests/test_device.py
@@ -8,8 +8,8 @@ import resource
import random
from pyverbs.pyverbs_error import PyverbsError, PyverbsRDMAError
-from pyverbs.tests.base import PyverbsAPITestCase
-import pyverbs.tests.utils as u
+from tests.base import PyverbsAPITestCase
+import tests.utils as u
import pyverbs.device as d
PAGE_SIZE = resource.getpagesize()
diff --git a/pyverbs/tests/mr.py b/tests/test_mr.py
similarity index 99%
rename from pyverbs/tests/mr.py
rename to tests/test_mr.py
index 4be3987fc18b..e87fb33624ed 100644
--- a/pyverbs/tests/mr.py
+++ b/tests/test_mr.py
@@ -7,13 +7,13 @@ from itertools import combinations as com
import random
from pyverbs.pyverbs_error import PyverbsRDMAError, PyverbsError
-from pyverbs.tests.base import PyverbsAPITestCase
+from tests.base import PyverbsAPITestCase
from pyverbs.base import PyverbsRDMAErrno
from pyverbs.mr import MR, MW, DMMR
-import pyverbs.tests.utils as u
import pyverbs.device as d
from pyverbs.pd import PD
import pyverbs.enums as e
+import tests.utils as u
MAX_IO_LEN = 1048576
diff --git a/pyverbs/tests/pd.py b/tests/test_pd.py
similarity index 97%
rename from pyverbs/tests/pd.py
rename to tests/test_pd.py
index 87528db7d437..978cf4900146 100644
--- a/pyverbs/tests/pd.py
+++ b/tests/test_pd.py
@@ -5,7 +5,7 @@ Test module for pyverbs' pd module.
"""
import random
-from pyverbs.tests.base import PyverbsAPITestCase
+from tests.base import PyverbsAPITestCase
from pyverbs.base import PyverbsRDMAErrno
import pyverbs.device as d
from pyverbs.pd import PD
diff --git a/pyverbs/tests/qp.py b/tests/test_qp.py
similarity index 99%
rename from pyverbs/tests/qp.py
rename to tests/test_qp.py
index bbf28244f641..1ce98388871b 100644
--- a/pyverbs/tests/qp.py
+++ b/tests/test_qp.py
@@ -5,12 +5,12 @@ Test module for pyverbs' qp module.
"""
import random
-from pyverbs.tests.base import PyverbsAPITestCase
from pyverbs.qp import QPInitAttr, QPAttr, QP
-import pyverbs.tests.utils as u
+from tests.base import PyverbsAPITestCase
import pyverbs.enums as e
from pyverbs.pd import PD
from pyverbs.cq import CQ
+import tests.utils as u
class QPTest(PyverbsAPITestCase):
diff --git a/pyverbs/tests/utils.py b/tests/utils.py
similarity index 100%
rename from pyverbs/tests/utils.py
rename to tests/utils.py
--
2.21.0
next prev parent reply other threads:[~2019-08-19 6:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-19 6:58 [PATCH rdma-core 00/14] rdma-core tests infrastructure Noa Osherovich
2019-08-19 6:58 ` [PATCH rdma-core 01/14] pyverbs/tests: Rename base class Noa Osherovich
2019-08-19 6:58 ` Noa Osherovich [this message]
2019-08-19 6:58 ` [PATCH rdma-core 03/14] build: Add pyverbs-based test to the build Noa Osherovich
2019-08-19 13:50 ` Jason Gunthorpe
2019-08-20 13:00 ` Noa Osherovich
2019-08-22 16:18 ` Leon Romanovsky
2019-08-22 16:52 ` Jason Gunthorpe
2019-09-01 13:30 ` Noa Osherovich
2019-09-09 10:29 ` Leon Romanovsky
2019-09-09 10:39 ` Noa Osherovich
2019-09-09 11:26 ` Leon Romanovsky
2019-09-09 11:30 ` Noa Osherovich
2019-09-09 11:38 ` Leon Romanovsky
2019-09-09 11:34 ` Leon Romanovsky
2019-08-19 6:58 ` [PATCH rdma-core 04/14] tests: BaseResources Class Noa Osherovich
2019-08-19 6:58 ` [PATCH rdma-core 05/14] tests: RDMATestCase Noa Osherovich
2019-08-19 6:58 ` [PATCH rdma-core 06/14] tests: TrafficResources class Noa Osherovich
2019-08-19 6:58 ` [PATCH rdma-core 07/14] tests: RCResources and UDResources classes Noa Osherovich
2019-08-19 6:58 ` [PATCH rdma-core 08/14] tests: ODP requires decorator Noa Osherovich
2019-08-19 6:58 ` [PATCH rdma-core 09/14] tests: Add traffic helper methods Noa Osherovich
2019-08-19 6:58 ` [PATCH rdma-core 10/14] tests: Add ODP RC test Noa Osherovich
2019-08-19 6:58 ` [PATCH rdma-core 11/14] tests: Add ODP UD test Noa Osherovich
2019-08-19 6:58 ` [PATCH rdma-core 12/14] tests: Fix test locating process Noa Osherovich
2019-08-19 6:58 ` [PATCH rdma-core 13/14] Documentation: Add background for rdma-core tests Noa Osherovich
2019-08-19 6:58 ` [PATCH rdma-core 14/14] tests: Unify API tests' output Noa Osherovich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190819065827.26921-3-noaos@mellanox.com \
--to=noaos@mellanox.com \
--cc=dledford@redhat.com \
--cc=jgg@mellanox.com \
--cc=leonro@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.