mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-22 21:24:41 +02:00
parent
17e36fe1cc
commit
7f64e58c32
@ -12,6 +12,12 @@ from optparse import OptionParser
|
|||||||
from xml.dom.minidom import getDOMImplementation
|
from xml.dom.minidom import getDOMImplementation
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
from subprocess import DEVNULL
|
||||||
|
except ImportError:
|
||||||
|
DEVNULL = open(os.devnull, 'w')
|
||||||
|
|
||||||
|
|
||||||
class TestSuite(object):
|
class TestSuite(object):
|
||||||
def __init__(self, configpath):
|
def __init__(self, configpath):
|
||||||
self._tests = []
|
self._tests = []
|
||||||
@ -78,15 +84,15 @@ class TestSuite(object):
|
|||||||
|
|
||||||
def _remove_file(self, path):
|
def _remove_file(self, path):
|
||||||
command = self._config['commands']['clean'].format(path)
|
command = self._config['commands']['clean'].format(path)
|
||||||
subprocess.call(command, shell=True)
|
subprocess.call(command, stdout=DEVNULL, stderr=DEVNULL, shell=True)
|
||||||
|
|
||||||
def _exec_command(self, command):
|
def _exec_command(self, command):
|
||||||
command = self._config['commands']['exec'].format(command)
|
command = self._config['commands']['exec'].format(command)
|
||||||
subprocess.call(command, shell=True)
|
subprocess.call(command, stdout=DEVNULL, stderr=DEVNULL, shell=True)
|
||||||
|
|
||||||
def _copy_file(self, source, destination):
|
def _copy_file(self, source, destination):
|
||||||
command = self._config['commands']['copy'].format(source, destination)
|
command = self._config['commands']['copy'].format(source, destination)
|
||||||
subprocess.call(command, shell=True)
|
subprocess.call(command, stdout=DEVNULL, stderr=DEVNULL, shell=True)
|
||||||
|
|
||||||
def _copy_test(self, path):
|
def _copy_test(self, path):
|
||||||
self._copy_file(path, os.path.join(self._config['settings']['test_root'],
|
self._copy_file(path, os.path.join(self._config['settings']['test_root'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user