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

Side by Side Diff: third_party/mesa/redirectoutput.py

Issue 17005007: Upgrading Mesa to 9.0.3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebaselined Created 7 years, 5 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
« no previous file with comments | « third_party/mesa/mesa_gensrc.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 import os
2 import os.path
3 import subprocess
4 import sys
5
6 if len(sys.argv) < 3:
7 print "Usage: %s OUTPUTFILE SCRIPTNAME ARGUMENTS" % sys.argv[0]
8 print "Re-execs the python interpreter against SCRIPTNAME with ARGS,"
9 print "redirecting output to OUTPUTFILE."
10 sys.exit(1)
11
12 abs_outputfile = os.path.abspath(sys.argv[1])
13 abs_outputdir = os.path.dirname(abs_outputfile)
14
15 if not os.path.isdir(abs_outputdir):
16 os.makedirs(abs_outputdir)
17
18 ret = 0
19
20 with open(abs_outputfile, "w") as f:
21 ret = subprocess.Popen([sys.executable] + sys.argv[2:], stdout=f).wait()
22
23 if ret:
24 os.remove(abs_outputfile)
25 sys.exit(ret)
OLDNEW
« no previous file with comments | « third_party/mesa/mesa_gensrc.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698