import unittest
from functools import lru_cache
-
+import os
from openpower.test.fmv_fcvt.fmv_fcvt import (FMvFCvtCases,
SVP64FMvFCvtCases)
from openpower.test.runner import TestRunnerBase
def __init__(self, test):
assert test == 'test', f"test={test!r}"
+ self.__old_silence_log = os.environ.get("SILENCELOG")
cases = make_cases()
assert self.SPLIT_INDEX != -1, "must be overridden"
# split cases evenly over tests
# can't do raise SkipTest if `start == end`, it makes unittest break
super().__init__(cases[start:end], fp=True)
+ def setUp(self):
+ super().setUp()
+ if self.__old_silence_log is None:
+ os.environ["SILENCELOG"] = "!*,default"
+
+ def tearDown(self):
+ super().tearDown()
+ if self.__old_silence_log is None:
+ del os.environ["SILENCELOG"]
+
@classmethod
def make_split_classes(cls):
for i in range(cls.SPLIT_COUNT):
import unittest
from functools import lru_cache
-
+import os
from openpower.test.algorithms.svp64_utf_8_validation import \
SVP64UTF8ValidationTestCase
from openpower.test.runner import TestRunnerBase
def __init__(self, test):
assert test == 'test', f"test={test!r}"
+ self.__old_silence_log = os.environ.get("SILENCELOG")
cases = make_cases()
assert self.SPLIT_INDEX != -1, "must be overridden"
# split cases evenly over tests
# can't do raise SkipTest if `start == end`, it makes unittest break
super().__init__(cases[start:end])
+ def setUp(self):
+ super().setUp()
+ if self.__old_silence_log is None:
+ os.environ["SILENCELOG"] = "!*,default"
+
+ def tearDown(self):
+ super().tearDown()
+ if self.__old_silence_log is None:
+ del os.environ["SILENCELOG"]
+
@classmethod
def make_split_classes(cls):
for i in range(cls.SPLIT_COUNT):