250f49f78d
Allows to run the tests on multiple operating systems and on the infrastructure that the Cockpit team maintains. `make vm` downloads one of Cockpit's test images (override which one with TEST_OS) and installs rpms build from the local checkout of lorax. The resulting image is placed in `test/images/$TEST_OS`. TEST_OS can be set to any of Cockpit's supported images (default: fedora-30). Run `make check-vm` to run the CLI checks in the VM. The bulk of the work is done in `test/check-cli`, which uses Cockpit's `bots` library to start the VM and run the script in it. Also included is a `test/run` script, which is the entrypoint for Cockpit's test infrastructure.
34 lines
1.0 KiB
Python
Executable File
34 lines
1.0 KiB
Python
Executable File
#!/usr/bin/python3
|
|
|
|
import sys
|
|
|
|
from pocketlint import FalsePositive, PocketLintConfig, PocketLinter
|
|
|
|
class LoraxLintConfig(PocketLintConfig):
|
|
def __init__(self):
|
|
PocketLintConfig.__init__(self)
|
|
|
|
self.falsePositives = [ FalsePositive(r"Module 'pylorax' has no 'version' member"),
|
|
FalsePositive(r"Catching too general exception Exception"),
|
|
FalsePositive(r"Module 'composer' has no 'version' member"),
|
|
]
|
|
|
|
@property
|
|
def pylintPlugins(self):
|
|
retval = super(LoraxLintConfig, self).pylintPlugins
|
|
# Not using threads so we can skip this
|
|
retval.remove("pocketlint.checkers.environ")
|
|
# No markup used
|
|
retval.remove("pocketlint.checkers.markup")
|
|
return retval
|
|
|
|
@property
|
|
def ignoreNames(self):
|
|
return { "bots", "rpmbuild" }
|
|
|
|
if __name__ == "__main__":
|
|
conf = LoraxLintConfig()
|
|
linter = PocketLinter(conf)
|
|
rc = linter.run()
|
|
sys.exit(rc)
|