sanitycheck: move sanity_chk -> pylib/twister

Move the "module" classes used by sanitycheck into a new location under
pylib, where we can have other python libraries reside instead of having
them all over the place.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2020-12-07 11:27:32 -05:00
commit e508babfed
6 changed files with 5 additions and 5 deletions

View file

@ -77,8 +77,8 @@ canonical_zephyr_base = os.path.realpath(ZEPHYR_BASE)
sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scripts/"))
from sanity_chk import scl
from sanity_chk import expr_parser
import scl
import expr_parser
logger = logging.getLogger('sanitycheck')
logger.setLevel(logging.DEBUG)
@ -364,7 +364,7 @@ class ExecutionError(SanityCheckException):
class HarnessImporter:
def __init__(self, name):
sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scripts/sanity_chk"))
sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scripts/pylib/twister"))
module = __import__("harness")
if name:
my_class = getattr(module, name)

View file

@ -204,7 +204,7 @@ try:
except ImportError:
print("Install tabulate python module with pip to use --device-testing option.")
sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scripts/sanity_chk"))
sys.path.insert(0, os.path.join(ZEPHYR_BASE, "scripts/pylib/twister"))
from sanitylib import HardwareMap, TestSuite, SizeCalculator, CoverageTool, ExecutionCounter
@ -534,7 +534,7 @@ Artificially long but functional example:
"'tests/' directories at the base of the Zephyr tree.")
board_root_list = ["%s/boards" % ZEPHYR_BASE,
"%s/scripts/sanity_chk/boards" % ZEPHYR_BASE]
"%s/scripts/pylib/twister/boards" % ZEPHYR_BASE]
parser.add_argument(
"-A", "--board-root", action="append", default=board_root_list,