Skip to content

Commit

Permalink
test_engine_globals.py: add type annotations and update uninitialized…
Browse files Browse the repository at this point in the history
  • Loading branch information
berquist authored Jan 9, 2025
1 parent cc8de7d commit 5e06091
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions src/sst/core/testingframework/test_engine_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,44 @@
"""
import os

from typing import TYPE_CHECKING
from typing import Dict, List, TYPE_CHECKING

if TYPE_CHECKING:
import configparser

from test_engine_junit import JUnitTestCase

# Verbose Defines
VERBOSE_QUIET = 0
VERBOSE_NORMAL = 1
VERBOSE_LOUD = 2
VERBOSE_DEBUG = 3

# Global Var Defines
TESTRUN_TESTRUNNINGFLAG = None
TESTRUN_SINGTHREAD_TESTSUITE_NAME = None
TESTRUN_JUNIT_TESTCASE_DICTLISTS = None
TESTRUN_TESTRUNNINGFLAG = False
TESTRUN_SINGTHREAD_TESTSUITE_NAME = ""
TESTRUN_JUNIT_TESTCASE_DICTLISTS: Dict[str, List["JUnitTestCase"]] = dict()

TESTOUTPUT_TOPDIRPATH = None
TESTOUTPUT_RUNDIRPATH = None
TESTOUTPUT_TMPDIRPATH = None
TESTOUTPUT_XMLDIRPATH = None
TESTOUTPUT_TOPDIRPATH = ""
TESTOUTPUT_RUNDIRPATH = ""
TESTOUTPUT_TMPDIRPATH = ""
TESTOUTPUT_XMLDIRPATH = ""

TESTENGINE_CONCURRENTMODE = None
TESTENGINE_THREADLIMIT = None
TESTENGINE_DEBUGMODE = None
TESTENGINE_LOGFAILMODE = None
TESTENGINE_IGNORESKIPS = None
TESTENGINE_VERBOSITY = None
TESTENGINE_SSTRUN_NUMRANKS = None
TESTENGINE_SSTRUN_NUMTHREADS = None
TESTENGINE_SSTRUN_GLOBALARGS = None
TESTENGINE_CORE_CONFFILE_PARSER = None
TESTENGINE_CORE_CONFINCLUDE_DICT = None
TESTENGINE_ELEM_CONFINCLUDE_DICT = None
TESTENGINE_CONCURRENTMODE = False
TESTENGINE_THREADLIMIT = 8
TESTENGINE_DEBUGMODE = False
TESTENGINE_LOGFAILMODE = False
TESTENGINE_IGNORESKIPS = False
TESTENGINE_VERBOSITY = 1
TESTENGINE_SSTRUN_NUMRANKS = 1
TESTENGINE_SSTRUN_NUMTHREADS = 1
TESTENGINE_SSTRUN_GLOBALARGS = ""
TESTENGINE_CORE_CONFFILE_PARSER: "configparser.RawConfigParser" = None # type: ignore [assignment]
TESTENGINE_CORE_CONFINCLUDE_DICT: Dict[str, str] = dict()
TESTENGINE_ELEM_CONFINCLUDE_DICT: Dict[str, str] = dict()
TESTENGINE_ERRORCOUNT = 0
TESTENGINE_SCENARIOSLIST = None
TESTENGINE_TESTNOTESLIST = None
TESTENGINE_SCENARIOSLIST: List[str] = []
TESTENGINE_TESTNOTESLIST: List[str] = []

# These are some globals to pass data between the top level test engine
# and the lower level testscripts
Expand Down Expand Up @@ -98,8 +100,8 @@ def init_test_engine_globals() -> None:
TESTENGINE_VERBOSITY = 1
TESTENGINE_SSTRUN_NUMRANKS = 1
TESTENGINE_SSTRUN_NUMTHREADS = 1
TESTENGINE_SSTRUN_GLOBALARGS = ["xxx"]
TESTENGINE_CORE_CONFFILE_PARSER = None
TESTENGINE_SSTRUN_GLOBALARGS = "xxx"
TESTENGINE_CORE_CONFFILE_PARSER = None # type: ignore [assignment]
TESTENGINE_CORE_CONFINCLUDE_DICT = {}
TESTENGINE_ELEM_CONFINCLUDE_DICT = {}
TESTENGINE_ERRORCOUNT = 0
Expand Down

0 comments on commit 5e06091

Please sign in to comment.