diff options
author | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2018-12-06 07:46:13 -0800 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2018-12-20 12:43:38 +0000 |
commit | defde0f87067eb473660794cbd4a2da69fdd191d (patch) | |
tree | 41a8e78df46ab9483aaf772622e1ba1e5e2e56c1 /test/framework.py | |
parent | 57f170bdf9967e3f8ea6e937a70c7f86187f95a2 (diff) |
Tests: Cleanup @skip decorator.
The runnning environment is static as of module load time,
so only evalute the conditions once at module load time.
Track-by: VPP-1518
Change-Id: I73b0d17ae1ff90789e70307f168d43921829aec8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'test/framework.py')
-rw-r--r-- | test/framework.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/test/framework.py b/test/framework.py index a0dd538e5b0..e3cf68d4aa5 100644 --- a/test/framework.py +++ b/test/framework.py @@ -132,23 +132,31 @@ def pump_output(testclass): # flag will take care of properly terminating the loop -def is_skip_aarch64_set(): +def _is_skip_aarch64_set(): return os.getenv('SKIP_AARCH64', 'n').lower() in ('yes', 'y', '1') +is_skip_aarch64_set = _is_skip_aarch64_set() -def is_platform_aarch64(): + +def _is_platform_aarch64(): return platform.machine() == 'aarch64' +is_platform_aarch64 = _is_platform_aarch64() + -def running_extended_tests(): +def _running_extended_tests(): s = os.getenv("EXTENDED_TESTS", "n") return True if s.lower() in ("y", "yes", "1") else False +running_extended_tests = _running_extended_tests() -def running_on_centos(): + +def _running_on_centos(): os_id = os.getenv("OS_ID", "") return True if "centos" in os_id.lower() else False +running_on_centos = _running_on_centos + class KeepAliveReporter(object): """ |