summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2007-10-04 21:54:24 +0000
committermbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2007-10-04 21:54:24 +0000
commitee2de75a9b78b80900f3cc16b69df9f1a3a9ecf8 (patch)
tree5308a3733eeec6e0a9559c91f7bc0cb85f1c235f
parentba2682eaa5efa837dc83df61c7e428692db3be36 (diff)
Split stdout and stderr for monitor_queue into separate files,
and make the log files unbuffered so we can actually see what's going on Signed-off-by: Martin J. Bligh <mbligh@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@750 592f7852-d20e-0410-864c-8624ca9c26a4
-rwxr-xr-xscheduler/monitor_queue11
-rwxr-xr-xserver/autoserv2
2 files changed, 8 insertions, 5 deletions
diff --git a/scheduler/monitor_queue b/scheduler/monitor_queue
index 562ac3f5..700c4e32 100755
--- a/scheduler/monitor_queue
+++ b/scheduler/monitor_queue
@@ -130,11 +130,14 @@ def run_job(control, queuename, scheduler_dir):
print "Starting job: %s" % control
print autoserv_cmd
- autoserv_log = open(os.path.join(debug, 'server.log'), 'w', 0)
- p = Popen(autoserv_cmd, shell=True, stdout=autoserv_log, stderr=STDOUT,
- cwd=results)
+ open(os.path.join(debug, 'autoserv.cmd'), 'w', 0).write(autoserv_cmd + '\n')
+ autoserv_stdout = open(os.path.join(debug, 'autoserv.stdout'), 'w', 0)
+ autoserv_stderr = open(os.path.join(debug, 'autoserv.stderr'), 'w', 0)
+ p = Popen(autoserv_cmd, shell=True, stdout=autoserv_stdout,
+ stderr=autoserv_stderr, cwd=results)
(pid, ret) = os.waitpid(p.pid, 0)
- autoserv_log.close()
+ autoserv_stdout.close()
+ autoserv_stderr.close()
# If this was a tempfile then clean it up
if not is_autoserv_ctl:
diff --git a/server/autoserv b/server/autoserv
index f328123c..156d61cb 100755
--- a/server/autoserv
+++ b/server/autoserv
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python -u
#
# Copyright 2007 Google Inc. Released under the GPL v2