Skip to content

Commit

Permalink
add more excludes and try to use parallel executor in test inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
jscotka committed Feb 13, 2024
1 parent 4c10141 commit 403a44f
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions test/common/testlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
import testvm
from lcov import write_lcov
from lib.constants import OSTREE_IMAGES
from testinsp import RunChecks
from testinsp import RunChecksInParallel
from testinsp.utils import FirstRunError

try:
from PIL import Image
Expand Down Expand Up @@ -1521,7 +1522,9 @@ def nonDestructiveSetup(self):
# run TestInspector as last cleanup action
def test_inspector_check():
print(" ---------- RESULTS OF TEST INSPECTOR ---------- ")
inspected_data = self.test_inspecor.check()
inspected_data = self.test_inspecor.check(init_after_check=True)
# use persistent store to increase speed
self.test_inspecor.store()
for k, v in inspected_data.items():
if v:
pprint(f">> Test Inspector FAIL - ({k}):")
Expand All @@ -1531,6 +1534,7 @@ def test_inspector_check():
exclude_dict["ListEtcDir"] = ["/etc/systemd/system/cockpit.service.d/notls.conf",
"/etc/lvm/archive",
"/etc/lvm/backup",
"/etc/libvirt/qemu/",
]
exclude_dict["ServiceInfo"] = ["cockpit",
"user@",
Expand All @@ -1541,9 +1545,21 @@ def test_inspector_check():
"systemd-hostnamed",
"systemd-logind.service",
"virtqemud",
"virtnetworkd",
"setroubleshootd",
".*SetroubleshootPrivileged.*",
"pmcd",
"pmproxy",
"pmlogger_farm",
"reportd",
".*freedesktop.problems.*"
"sssd-kcm",

Check warning

Code scanning / CodeQL

Implicit string concatenation in a list Warning

Implicit string concatenation. Maybe missing a comma?
]
self.test_inspecor = RunChecks(external_executor=m.execute, exclude_dict=exclude_dict)
self.test_inspecor.init()
self.test_inspecor = RunChecksInParallel(external_executor=m.execute, exclude_dict=exclude_dict)
try:
self.test_inspecor.load()
except FirstRunError:
self.test_inspecor.init()
self.addCleanup(test_inspector_check)

# helps with mapping journal output to particular tests
Expand Down

0 comments on commit 403a44f

Please sign in to comment.