From: Shivani Bhardwaj Date: Fri, 28 Jun 2024 06:31:40 +0000 (+0530) Subject: run.py: add option to check for architecture X-Git-Tag: suricata-7.0.7~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a144407e830fe1a69b0111c06750f76b9c280e79;p=thirdparty%2Fsuricata-verify.git run.py: add option to check for architecture --- diff --git a/README.md b/README.md index 20ddb609e..bc10c6a8f 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,10 @@ requires: # a test run only on Linux. os: linux + # Test is only for the liste architecture. For example, following would + # make a test run only on x86_64. Other values can be amd64, i386, etc. + arch: x86_64 + # Require the presence of specific features. features: # Restrict the test to builds with HAVE_LUA. diff --git a/run.py b/run.py index b9a3f1c99..478bcce54 100755 --- a/run.py +++ b/run.py @@ -373,6 +373,10 @@ def check_requires(requires, suricata_config: SuricataConfig): cur_platform = platform.system().lower() if not cur_platform.startswith(requires["os"].lower()): raise UnsatisfiedRequirementError(requires["os"]) + elif key == "arch": + cur_arch = platform.machine().lower() + if not cur_arch.startswith(requires["arch"].lower()): + raise UnsatisfiedRequirementError(requires["arch"]) else: raise Exception("unknown requires types: %s" % (key))