From: Jason Ish Date: Wed, 20 Nov 2019 21:45:05 +0000 (-0600) Subject: run: fix --force to force running of skipped tests X-Git-Tag: suricata-6.0.4~365 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64dbaa3d156988393e551410ccafa0c86f9f957f;p=thirdparty%2Fsuricata-verify.git run: fix --force to force running of skipped tests --- diff --git a/run.py b/run.py index 711491e61..b6716ef84 100755 --- a/run.py +++ b/run.py @@ -342,11 +342,12 @@ class FilterCheck: class TestRunner: - def __init__(self, cwd, directory, outdir, suricata_config, verbose=False): + def __init__(self, cwd, directory, outdir, suricata_config, verbose=False, force=False): self.cwd = cwd self.directory = directory self.suricata_config = suricata_config self.verbose = verbose + self.force = force self.output = outdir # The name is just the directory name. @@ -498,8 +499,9 @@ class TestRunner: sys.stdout.write("===> %s: " % os.path.basename(self.directory)) sys.stdout.flush() - self.check_requires() - self.check_skip() + if not self.force: + self.check_requires() + self.check_skip() if WIN32 and os.path.exists(os.path.join(self.directory, "check.sh")): raise UnsatisfiedRequirementError("check.sh tests are not supported on Windows") @@ -858,7 +860,7 @@ def main(): outdir = os.path.join(os.path.realpath(args.outdir), name, "output") test_runner = TestRunner( - cwd, dirpath, outdir, suricata_config, args.verbose) + cwd, dirpath, outdir, suricata_config, args.verbose, args.force) try: results = test_runner.run() passed += results["success"]