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'
25 """Return list of tests to omit for this module.
26 If the module does not define this tag or if it is empty, an empty list
29 moduleInfo = mevis.MLAB.moduleInfo(moduleName)
33 if TESTS_TO_OMIT_TAG
in moduleInfo:
34 testsToOmit = moduleInfo[ TESTS_TO_OMIT_TAG ].lower().split()
39 Logging.info(
'"%s" test was omitted due to the test machine\'s configuration' % testIdentifier)
45 Logging.info(
'"%s" test was omitted on module demand' % testIdentifier)
52 directlyOmitted = testIdentifier
in omittedTests
53 allOmitted = ALL_TESTS_IDENTIFIER
in omittedTests
55 return directlyOmitted
or allOmitted
isTestOmittedAndLogIfSo(moduleName, testIdentifier)
logThatTestWasOmittedByConfiguration(testIdentifier)
getTestsToOmit(moduleName)
isTestOmitted(moduleName, testIdentifier)