diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2018-12-23 07:24:41 +0100 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-01-04 02:10:47 +0100 |
commit | 2d403709d97cca381873a9d56cd37f51c0f3eade (patch) | |
tree | 201ca01daaeaf3a242c78684ea5fc5e7ff23758f /test/pacman/pactest.py | |
parent | ecac357c1a20f3e09ae979397e5efd225b03f895 (diff) | |
download | pacman-2d403709d97cca381873a9d56cd37f51c0f3eade.tar.gz pacman-2d403709d97cca381873a9d56cd37f51c0f3eade.tar.xz |
allow tests for disabled features to be skipped
Previously, pacman's test suite would fail when compiled without
signature support.
Adds a require_capability method to pmtest objects. Currently
recognized values are 'gpg', 'curl', and 'nls'; although only gpg is
used presently. Missing features are indicated by running pactest with
one of the --without-<feature> options.
This modifies pmenv to run each case as independent tests. Previously,
a single pmenv could run multiple tests, combining there output into
a single TAP stream but making it impossible to properly skip an entire
test case. This change does not affect running pactest.py with a single
test (as both autotools and meson do), but will affect anybody manually
running pactest.py with multiple tests at once.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test/pacman/pactest.py')
-rwxr-xr-x | test/pacman/pactest.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/pacman/pactest.py b/test/pacman/pactest.py index a563fa72..2d1edf1d 100755 --- a/test/pacman/pactest.py +++ b/test/pacman/pactest.py @@ -77,6 +77,15 @@ def create_parser(): parser.add_option("--bindir", type = "string", dest = "bindir", action = "append", help = "specify location of binaries") + parser.add_option("--without-gpg", action = "store_true", + dest = "missing_gpg", default = False, + help = "skip gpg-related tests") + parser.add_option("--without-curl", action = "store_true", + dest = "missing_curl", default = False, + help = "skip downloader-related tests") + parser.add_option("--without-nls", action = "store_true", + dest = "missing_nls", default = False, + help = "skip translation-related tests") parser.add_option("--keep-root", action = "store_true", dest = "keeproot", default = False, help = "don't remove the generated pacman root filesystem") @@ -137,6 +146,9 @@ if __name__ == "__main__": env.pacman["manual-confirm"] = opts.manualconfirm env.pacman["scriptlet-shell"] = opts.scriptletshell env.pacman["ldconfig"] = opts.ldconfig + env.config["gpg"] = not opts.missing_gpg + env.config["nls"] = not opts.missing_nls + env.config["curl"] = not opts.missing_curl try: for i in args: |