Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/run.py
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-12-27 18:44:21 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-12-27 18:44:21 (GMT)
commite60122f2e4a31ab4f4b39e0a2b6358afaca43f4f (patch)
tree1db5239da4d8fd9e536a4c01c7119b5e0ae5ef5c /devbot/run.py
parent51a2618bef58a15d2e56bb06a9b90afe48db0815 (diff)
Fix run and test logs
Diffstat (limited to 'devbot/run.py')
-rw-r--r--devbot/run.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/devbot/run.py b/devbot/run.py
index 8d47adb..038775b 100644
--- a/devbot/run.py
+++ b/devbot/run.py
@@ -5,6 +5,7 @@ import string
import random
import shutil
import subprocess
+import sys
import time
import tempfile
@@ -25,6 +26,12 @@ def run(command):
if output:
args.extend(["--output", output])
+ stdout = open(config.log_path, 'a')
+ stderr = stdout
+
+ os.dup2(stdout.fileno(), sys.stdout.fileno())
+ os.dup2(stderr.fileno(), sys.stderr.fileno())
+
os.execlp(args[0], *args)
@@ -63,7 +70,7 @@ def run_test(command, test_path, virtual=False):
return result
-def collect_logs(source_path, log_name):
+def collect_logs(source_path):
logs = {}
for filename in os.listdir(source_path):
if filename.endswith(".log"):