summaryrefslogtreecommitdiffstats
path: root/webkit/build
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-13 23:19:35 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-13 23:19:35 +0000
commit46351669c279764e1b070943366d7c0ea84a243a (patch)
tree538f972bd179da24f15b2c4c45b603e40d9ff657 /webkit/build
parent7d05aff2f554a0c7a733be446a7caba09dfc303a (diff)
downloadchromium_src-46351669c279764e1b070943366d7c0ea84a243a.zip
chromium_src-46351669c279764e1b070943366d7c0ea84a243a.tar.gz
chromium_src-46351669c279764e1b070943366d7c0ea84a243a.tar.bz2
Build pipeline directly in build/action_maketokenizer.py.
Review URL: http://codereview.chromium.org/67086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13631 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/build')
-rwxr-xr-xwebkit/build/action_maketokenizer.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/webkit/build/action_maketokenizer.py b/webkit/build/action_maketokenizer.py
index 1823495..0c45265 100755
--- a/webkit/build/action_maketokenizer.py
+++ b/webkit/build/action_maketokenizer.py
@@ -55,17 +55,19 @@ def main(args):
maketokenizer = inputs[0]
flex_input = inputs[1]
- # Build up the command.
- command = 'flex -t %s | perl %s > %s' % (flex_input, maketokenizer, output)
-
# Do it. check_call is new in 2.5, so simulate its behavior with call and
# assert.
- # TODO(mark): Don't use shell=True, build up the pipeline directly.
- p = subprocess.Popen(command, shell=True)
- return_code = p.wait()
- assert return_code == 0
+ outfile = open(output, 'wb')
+ p1 = subprocess.Popen(['flex', '-t', flex_input], stdout=subprocess.PIPE)
+ p2 = subprocess.Popen(['perl', maketokenizer], stdin=p1.stdout,
+ stdout=outfile)
+
+ r1 = p1.wait()
+ r2 = p2.wait()
+ assert r1 == 0
+ assert r2 == 0
- return return_code
+ return 0
if __name__ == '__main__':