selftest.py: Only run teardown_all when actually relevant.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 5 Mar 2012 23:38:54 +0000 (00:38 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 5 Mar 2012 23:48:14 +0000 (00:48 +0100)
selftest/selftest.py

index 26c409a..1b20441 100755 (executable)
@@ -538,12 +538,10 @@ else:
 
         if opts.resetup_environment:
             env_manager.teardown_env(envname)
+    env_manager.teardown_all()
 
 sys.stdout.write("\n")
 
-if not opts.list:
-    env_manager.teardown_all()
-
 # if there were any valgrind failures, show them
 for fn in os.listdir(prefix):
     if fn.startswith("valgrind.log"):