test suite reviews and discussions
 help / color / mirror / Atom feed
From: ohilyard@iol.unh.edu
To: dts@dpdk.org
Cc: lijuan.tu@intel.com, Owen Hilyard <ohilyard@iol.unh.edu>
Subject: [dts] [PATCH v2 1/3] framework/test_result: Fix circular import
Date: Mon,  9 Aug 2021 08:40:59 -0400	[thread overview]
Message-ID: <20210809124101.13719-1-ohilyard@iol.unh.edu> (raw)

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


             reply	other threads:[~2021-08-09 12:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 12:40 ohilyard [this message]
2021-08-09 12:41 ` [dts] [PATCH v2 2/3] requirements: Added required modules to requirements ohilyard
2021-08-09 12:41 ` [dts] [PATCH v2 3/3] ci/initial: Added script to get the tests for a patchset ohilyard

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=20210809124101.13719-1-ohilyard@iol.unh.edu \
    --to=ohilyard@iol.unh.edu \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    /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 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).