]> granicus.if.org Git - icinga2/commitdiff
Make setup output quiet
authorJohannes Meyer <johannes.meyer@netways.de>
Fri, 6 Dec 2013 12:02:26 +0000 (13:02 +0100)
committerJohannes Meyer <johannes.meyer@netways.de>
Mon, 16 Dec 2013 14:37:37 +0000 (15:37 +0100)
refs #5223

test/jenkins/run_tests.py

index 2dea88f9c1f806bb6fd0248b4ebaddc437b9fecb..f0a180cd9cf88eb8cd248722372240c75ce88d99 100755 (executable)
@@ -12,6 +12,12 @@ from optparse import OptionParser
 from xml.dom.minidom import getDOMImplementation
 
 
+try:
+    from subprocess import DEVNULL
+except ImportError:
+    DEVNULL = open(os.devnull, 'w')
+
+
 class TestSuite(object):
     def __init__(self, configpath):
         self._tests = []
@@ -78,15 +84,15 @@ class TestSuite(object):
 
     def _remove_file(self, 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):
         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):
         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):
         self._copy_file(path, os.path.join(self._config['settings']['test_root'],