diff options
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2014-07-04 22:47:14 +0200 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2014-08-03 10:46:31 +0200 |
commit | 0c5e80c3b42b2fc02e8b800bada7f6bb30a56578 (patch) | |
tree | 2348badcf861907e79c16b1df0d640d667a94b61 | |
parent | 80eca94c8eec7dfeda02eff437309c4e20931afd (diff) | |
download | pacman-0c5e80c3b42b2fc02e8b800bada7f6bb30a56578.tar.gz pacman-0c5e80c3b42b2fc02e8b800bada7f6bb30a56578.tar.xz |
pactest: parse options before environment setup
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
-rwxr-xr-x | test/pacman/pactest.py | 8 |
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 |