summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2021-01-19 19:30:05 +0100
committerAllan McRae <allan@archlinux.org>2021-01-21 08:18:14 +0100
commitf9bc6c2b09c18dd48f839f53d834c6fd1bfd2dd3 (patch)
tree39f03cac84a2d56376e29a446f8fd2ae3a7681c8 /test
parent84f9cb021e5244118d09752e725c1c2956d4281c (diff)
downloadpacman-f9bc6c2b09c18dd48f839f53d834c6fd1bfd2dd3.tar.gz
pacman-f9bc6c2b09c18dd48f839f53d834c6fd1bfd2dd3.tar.xz
pactest.py: read options from PACTEST_OPTS
Makes it easier to pass options when not running pactest directly. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test')
-rwxr-xr-xtest/pacman/pactest.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/pacman/pactest.py b/test/pacman/pactest.py
index 20af41dc..c295bfc0 100755
--- a/test/pacman/pactest.py
+++ b/test/pacman/pactest.py
@@ -125,7 +125,8 @@ if __name__ == "__main__":
# parse options
opt_parser = create_parser()
- (opts, args) = opt_parser.parse_args()
+ (opts, args) = opt_parser.parse_args(args=os.getenv('PACTEST_OPTS', '').split())
+ (opts, args) = opt_parser.parse_args(values=opts)
if args is None or len(args) == 0:
tap.bail("no tests defined, nothing to do")