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 @@ def create_parser(): 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 @@ def create_parser(): 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)