mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-10-27 18:55:29 +03:00
clitest: Don't fork rm for every test
Speeds up the tests quite a bit
This commit is contained in:
parent
4f59c24b40
commit
4822e6478f
@ -18,6 +18,7 @@ import atexit
|
||||
import logging
|
||||
import os
|
||||
import shlex
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
@ -200,7 +201,10 @@ class Command(object):
|
||||
def _get_output(self):
|
||||
try:
|
||||
for i in new_files:
|
||||
os.system("rm %s > /dev/null 2>&1" % i)
|
||||
if os.path.isdir(i):
|
||||
shutil.rmtree(i)
|
||||
elif os.path.exists(i):
|
||||
os.unlink(i)
|
||||
|
||||
code, output = self._launch_command()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user