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

Side by Side Diff: swarm_client/tests/trace_inputs/child1.py

Issue 69143004: Delete swarm_client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « swarm_client/tests/threading_utils_test.py ('k') | swarm_client/tests/trace_inputs/child2.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import os
7 import subprocess
8 import sys
9
10
11 def child():
12 """When the gyp argument is not specified, the command is started from
13 --root-dir directory.
14 """
15 print 'child from %s' % os.getcwd()
16 # Force file opening with a non-normalized path.
17 open(os.path.join('tests', '..', 'trace_inputs.py'), 'rb').close()
18 open(os.path.join(
19 'tests', '..', 'tests', 'trace_inputs_smoke_test.py'), 'rb').close()
20 # Do not wait for the child to exit.
21 # Use relative directory.
22 subprocess.Popen(
23 ['python', 'child2.py'], cwd=os.path.join('tests', 'trace_inputs'))
24 return 0
25
26
27 def child_gyp():
28 """When the gyp argument is specified, the command is started from --cwd
29 directory.
30 """
31 print 'child_gyp from %s' % os.getcwd()
32 # Force file opening.
33 open(os.path.join('..', 'trace_inputs.py'), 'rb').close()
34 open(os.path.join('..', 'tests', 'trace_inputs_smoke_test.py'), 'rb').close()
35 # Do not wait for the child to exit.
36 # Use relative directory.
37 subprocess.Popen(['python', 'child2.py'], cwd='trace_inputs')
38 return 0
39
40
41 def main():
42 if sys.argv[1] == '--child':
43 return child()
44 if sys.argv[1] == '--child-gyp':
45 return child_gyp()
46 return 1
47
48
49 if __name__ == '__main__':
50 sys.exit(main())
OLDNEW
« no previous file with comments | « swarm_client/tests/threading_utils_test.py ('k') | swarm_client/tests/trace_inputs/child2.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698