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

Side by Side Diff: recipes/engine_tests/bad_subprocess.py

Issue 1959563002: Use subprocess42 in recipe_engine to avoid threading madness. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: *sigh* presubmit Created 4 years, 7 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
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 """Tests that daemons that hang on to STDOUT can't cause the engine to hang."""
6
7 DEPS = [
8 'python',
9 ]
10
11 def RunSteps(api):
12 api.python.inline("bad deamon", """
13 import os
14 import time
15 import sys
16
17 print "parent"
18 pid = os.fork()
19 if pid > 0:
20 "parent leaves"
21 sys.exit(0)
22
23 print "child"
24 pid = os.fork()
25 if pid > 0:
26 "child leaves"
27 sys.exit(0)
28
29 print "daemon sleepin'"
30 time.sleep(30)
31
32 print "ROAAARRRR!!!"
33 """)
34
35 def GenTests(api):
36 yield api.test('basic')
37
OLDNEW
« no previous file with comments | « recipe_engine/unittests/step_runner_test.py ('k') | recipes/engine_tests/bad_subprocess.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698