Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xcommands/run2
-rwxr-xr-xcommands/run-tests4
-rw-r--r--devbot/run.py9
3 files changed, 11 insertions, 4 deletions
diff --git a/commands/run b/commands/run
index e08a1c2..5c4113b 100755
--- a/commands/run
+++ b/commands/run
@@ -8,7 +8,7 @@ import common
from devbot import run
from devbot import build
-common.setup()
+common.setup(log_name="run")
if not build.build():
sys.exit(1)
diff --git a/commands/run-tests b/commands/run-tests
index ee0fbb5..a000f3b 100755
--- a/commands/run-tests
+++ b/commands/run-tests
@@ -10,7 +10,7 @@ import common
from devbot import run
from devbot import test
-common.setup()
+common.setup(log_name="test")
def _run_ui_tests():
@@ -23,7 +23,7 @@ def _run_ui_tests():
result = run.run_test("sugar-runner", test_path, virtual)
logs_path = os.path.join(profile_path, "logs")
- run.collect_logs(logs_path, "test")
+ run.collect_logs(logs_path)
if not result:
sys.exit(1)
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"):