test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH 1/3] framework/test_result: Fix circular import
@ 2021-08-09 11:24 ohilyard
  2021-08-09 11:24 ` [dts] [PATCH 2/3] requirements: Added required modules to requirements ohilyard
  2021-08-09 11:24 ` [dts] [PATCH 3/3] ci/initial: Added script to get the tests for a patchset ohilyard
  0 siblings, 2 replies; 3+ messages in thread
From: ohilyard @ 2021-08-09 11:24 UTC (permalink / raw)
  To: dts; +Cc: lijuan.tu, Owen Hilyard

From: Owen Hilyard <ohilyard@iol.unh.edu>

This circular import is normally fine because the debugger module is
initialized before test_case is imported, but since that is not
necessarily the case with the dependency script, the circular import
needed to be removed.

Signed-off-by: Owen Hilyard <ohilyard@iol.unh.edu>
---
 framework/test_case.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/framework/test_case.py b/framework/test_case.py
index 98b716b9..3d7bc30e 100644
--- a/framework/test_case.py
+++ b/framework/test_case.py
@@ -33,7 +33,6 @@
 A base class for creating DTF test cases.
 """
 import re
-import debugger
 import traceback
 import signal
 import time
@@ -374,6 +373,10 @@ class TestCase(object):
         """
         Execute all test cases in one suite.
         """
+
+        # local import to avoid circular import
+        import debugger
+
         # prepare debugger rerun case environment
         if self._enable_debug or self._debug_case:
             debugger.AliveSuite = self
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-09 11:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09 11:24 [dts] [PATCH 1/3] framework/test_result: Fix circular import ohilyard
2021-08-09 11:24 ` [dts] [PATCH 2/3] requirements: Added required modules to requirements ohilyard
2021-08-09 11:24 ` [dts] [PATCH 3/3] ci/initial: Added script to get the tests for a patchset ohilyard

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ https://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git