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 17:02:06 -0400
committerAllan McRae <allan@archlinux.org>2014-08-03 18:46:31 +1000
commit73717f89df6ebf3c03f00a70ca2728c04cebe7a0 (patch)
treeabc2bfdccc4d492d1f74045a4fb2f3f469b76e9e /test
parent6650c43fcafd144c78349aca9eb80c0ae3886a9d (diff)
pactest: check for tests before environment setup
Setting up the temporary directory and environment is pointless if there are no tests to run. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/pacman/pactest.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/pacman/pactest.py b/test/pacman/pactest.py
index cba439c3..58c14f6d 100755
--- a/test/pacman/pactest.py
+++ b/test/pacman/pactest.py
@@ -90,6 +90,10 @@ if __name__ == "__main__":
tap.bail("cannot locate pacman binary")
sys.exit(2)
+ if args is None or len(args) == 0:
+ tap.bail("no tests defined, nothing to do")
+ sys.exit(2)
+
# instantiate env
root_path = tempfile.mkdtemp(prefix='pactest-')
env = pmenv.pmenv(root=root_path)
@@ -105,11 +109,6 @@ if __name__ == "__main__":
env.pacman["scriptlet-shell"] = opts.scriptletshell
env.pacman["ldconfig"] = opts.ldconfig
- if args is None or len(args) == 0:
- tap.bail("no tests defined, nothing to do")
- os.rmdir(root_path)
- sys.exit(2)
-
try:
for i in args:
env.addtest(i)