11"""Shared code for generic tests"""
13from TestSupport
import Logging
18TESTS_TO_OMIT_TAG =
"testsToOmit"
19FORMAL_TEST_IDENTIFIER =
"formal"
20ALL_TESTS_IDENTIFIER =
"all"
21EXAMPLE_NETWORK_TEST_IDENTIFIER =
"example_network"
22PANEL_TEST_IDENTIFIER =
"open_panel"
26 """Return list of tests to omit for this module.
27 If the module does not define this tag or if it is empty, an empty list
30 moduleInfo = mevis.MLAB.moduleInfo(moduleName)
34 if TESTS_TO_OMIT_TAG
in moduleInfo:
35 testsToOmit = moduleInfo[TESTS_TO_OMIT_TAG].lower().split()
41 Logging.info(
'"%s" test was omitted due to the test machine\'s configuration' % testIdentifier)
48 Logging.info(
'"%s" test was omitted on module demand' % testIdentifier)
56 directlyOmitted = testIdentifier
in omittedTests
57 allOmitted = ALL_TESTS_IDENTIFIER
in omittedTests
59 return directlyOmitted
or allOmitted
isTestOmittedAndLogIfSo(moduleName, testIdentifier)
logThatTestWasOmittedByConfiguration(testIdentifier)
getTestsToOmit(moduleName)
isTestOmitted(moduleName, testIdentifier)