summaryrefslogtreecommitdiffstats
path: root/test/pacman/pactest.py
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-09-20 15:09:29 +0200
committerAllan McRae <allan@archlinux.org>2013-01-17 13:32:54 +0100
commit4a8c2852a887d2b1aaa43be3071ab586eb24b9e3 (patch)
tree13bd705ab4b7c139d1cc378f7c7c5fe715483402 /test/pacman/pactest.py
parent993700bc6b12cd291544d2a22845f480e8a7925e (diff)
downloadpacman-4a8c2852a887d2b1aaa43be3071ab586eb24b9e3.tar.gz
pacman-4a8c2852a887d2b1aaa43be3071ab586eb24b9e3.tar.xz
pmtest: resolve path to scriptlet shell
In order to support a variety of values for the --with-scriptlet-shell configure flag, pmtest has to be aware of what kind of path was passed, be it an absolute path or a fragment for a path lookup. For absolute paths, leave the path alone. For fragments, search the PATH environment var for the resolved path to the binary. In both cases, join the resultant path to the root directory defined for the test, not a pre-determined bin directory. Fixes FS#31552. With-contribution-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'test/pacman/pactest.py')
-rwxr-xr-xtest/pacman/pactest.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/pacman/pactest.py b/test/pacman/pactest.py
index 2fb64edc..42c6a825 100755
--- a/test/pacman/pactest.py
+++ b/test/pacman/pactest.py
@@ -3,6 +3,7 @@
# pactest : run automated testing on the pacman binary
#
# Copyright (c) 2006 by Aurelien Foret <orelien@chez.com>
+# Copyright (c) 2006-2013 Pacman Development Team <pacman-dev@archlinux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -81,6 +82,9 @@ def create_parser():
parser.add_option("--manual-confirm", action = "store_true",
dest = "manualconfirm", default = False,
help = "do not use --noconfirm for pacman calls")
+ parser.add_option("--scriptlet-shell", type = "string",
+ dest = "scriptletshell", default = "sh",
+ help = "specify shell used for install scriptlets")
return parser
@@ -99,6 +103,7 @@ if __name__ == "__main__":
env.pacman["gdb"] = opts.gdb
env.pacman["valgrind"] = opts.valgrind
env.pacman["manual-confirm"] = opts.manualconfirm
+ env.pacman["scriptlet-shell"] = opts.scriptletshell
if opts.testcases is None or len(opts.testcases) == 0:
print "no tests defined, nothing to do"