Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2014-07-04 16:47:14 -0400
committerAllan McRae <allan@archlinux.org>2014-08-03 18:46:31 +1000
commit0c5e80c3b42b2fc02e8b800bada7f6bb30a56578 (patch)
tree2348badcf861907e79c16b1df0d640d667a94b61 /test
parent80eca94c8eec7dfeda02eff437309c4e20931afd (diff)
pactest: parse options before environment setup
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/pacman/pactest.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/pacman/pactest.py b/test/pacman/pactest.py
index 0e06f17d..b2b9c289 100755
--- a/test/pacman/pactest.py
+++ b/test/pacman/pactest.py
@@ -82,12 +82,14 @@ if __name__ == "__main__":
tap.bail("Python versions before 2.7 are not supported.")
sys.exit(1)
- # instantiate env and parser objects
- root_path = tempfile.mkdtemp(prefix='pactest-')
- env = pmenv.pmenv(root=root_path)
+ # parse options
opt_parser = create_parser()
(opts, args) = opt_parser.parse_args()
+ # instantiate env
+ root_path = tempfile.mkdtemp(prefix='pactest-')
+ env = pmenv.pmenv(root=root_path)
+
# add parsed options to env object
util.verbose = opts.verbose
env.pacman["debug"] = opts.debug