Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: third_party/buildbot_7_12/buildbot/test/emitlogs.py

Issue 12207158: Bye bye buildbot 0.7.12. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 import sys, time, os.path, StringIO
2
3 mode = 0
4 if len(sys.argv) > 1:
5 mode = int(sys.argv[1])
6
7 if mode == 0:
8 log2 = open("log2.out", "wt")
9 log3 = open("log3.out", "wt")
10 elif mode == 1:
11 # delete the logfiles first, and wait a moment to exercise a failure path
12 if os.path.exists("log2.out"):
13 os.unlink("log2.out")
14 if os.path.exists("log3.out"):
15 os.unlink("log3.out")
16 time.sleep(2)
17 log2 = open("log2.out", "wt")
18 log3 = open("log3.out", "wt")
19 elif mode == 2:
20 # don't create the logfiles at all
21 log2 = StringIO.StringIO()
22 log3 = StringIO.StringIO()
23
24 def write(i):
25 log2.write("this is log2 %d\n" % i)
26 log2.flush()
27 log3.write("this is log3 %d\n" % i)
28 log3.flush()
29 sys.stdout.write("this is stdout %d\n" % i)
30 sys.stdout.flush()
31
32 write(0)
33 time.sleep(1)
34 write(1)
35 sys.stdin.read(1)
36 write(2)
37
38 log2.close()
39 log3.close()
40
41 sys.exit(0)
42
OLDNEW
« no previous file with comments | « third_party/buildbot_7_12/buildbot/test/emit.py ('k') | third_party/buildbot_7_12/buildbot/test/mail/freshcvs.1 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698