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

Side by Side Diff: native_client_sdk/src/build_tools/build_examples.py

Issue 11882012: Convert all project to use common.mk (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix missing common.mk path Created 7 years, 11 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
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import optparse 6 import optparse
7 import os 7 import os
8 import sys 8 import sys
9 9
10 import buildbot_common
10 import build_sdk 11 import build_sdk
11 import build_utils 12 import build_utils
12 import test_sdk 13 import test_sdk
13 14
14 sys.path.append(os.path.join(build_sdk.SDK_SRC_DIR, 'tools')) 15 sys.path.append(os.path.join(build_sdk.SDK_SRC_DIR, 'tools'))
15 import getos 16 import getos
16 17
17 18
18 def main(args): 19 def main(args):
19 parser = optparse.OptionParser() 20 parser = optparse.OptionParser()
21 parser.add_option('--copy',
22 help='Only\'t copy the files, don\'t build.',
binji 2013/01/16 22:46:55 nit: s/Only\'t/Only/
noelallen1 2013/01/16 23:21:10 Done.
23 action='store_true' )
20 parser.add_option('--clobber-examples', 24 parser.add_option('--clobber-examples',
21 help='Don\'t examples directory before copying new files', 25 help='Don\'t examples directory before copying new files',
22 action='store_true' ) 26 action='store_true' )
23 parser.add_option('--test-examples', 27 parser.add_option('--test-examples',
24 help='Run the pyauto tests for examples.', action='store_true') 28 help='Run the pyauto tests for examples.', action='store_true')
25 parser.add_option('--experimental', 29 parser.add_option('--experimental',
26 help='build experimental examples and libraries', action='store_true') 30 help='build experimental examples and libraries', action='store_true')
27 parser.add_option('-t', '--toolchain', 31 parser.add_option('-t', '--toolchain',
28 help='Build using toolchain. Can be passed more than once.', 32 help='Build using toolchain. Can be passed more than once.',
29 action='append') 33 action='append')
(...skipping 11 matching lines...) Expand all
41 if invalid_toolchains: 45 if invalid_toolchains:
42 print 'Ignoring invalid toolchains: %s' % (', '.join(invalid_toolchains),) 46 print 'Ignoring invalid toolchains: %s' % (', '.join(invalid_toolchains),)
43 toolchains = list(set(options.toolchain) - invalid_toolchains) 47 toolchains = list(set(options.toolchain) - invalid_toolchains)
44 48
45 pepper_ver = str(int(build_utils.ChromeMajorVersion())) 49 pepper_ver = str(int(build_utils.ChromeMajorVersion()))
46 pepperdir = os.path.join(build_sdk.OUT_DIR, 'pepper_' + pepper_ver) 50 pepperdir = os.path.join(build_sdk.OUT_DIR, 'pepper_' + pepper_ver)
47 platform = getos.GetPlatform() 51 platform = getos.GetPlatform()
48 52
49 build_sdk.options = options 53 build_sdk.options = options
50 54
55 src_path = os.path.join(buildbot_common.SDK_SRC_DIR, 'tools', '*.mk')
binji 2013/01/16 22:46:55 could run build_sdk.BuildStepCopyBuildHelpers inst
noelallen1 2013/01/16 23:21:10 Done.
56 dst_path = os.path.join(pepperdir, 'tools')
57 buildbot_common.CopyDir(src_path, dst_path)
58
51 build_sdk.BuildStepCopyExamples(pepperdir, toolchains, options.experimental, 59 build_sdk.BuildStepCopyExamples(pepperdir, toolchains, options.experimental,
52 options.clobber_examples) 60 options.clobber_examples)
61 test_sdk.BuildStepCopyTests(pepperdir, toolchains, options.experimental,
62 options.clobber_examples)
63 if options.copy:
64 return 0
65
53 # False = don't clean after building the libraries directory. 66 # False = don't clean after building the libraries directory.
54 build_sdk.BuildStepBuildLibraries(pepperdir, platform, 'src', False) 67 build_sdk.BuildStepBuildLibraries(pepperdir, platform, 'src', False)
55 test_sdk.BuildStepBuildExamples(pepperdir, platform) 68 test_sdk.BuildStepBuildExamples(pepperdir, platform)
56 test_sdk.BuildStepCopyTests(pepperdir, toolchains, options.experimental,
57 options.clobber_examples)
58 test_sdk.BuildStepBuildTests(pepperdir, platform) 69 test_sdk.BuildStepBuildTests(pepperdir, platform)
59 if options.test_examples: 70 if options.test_examples:
60 test_sdk.BuildStepRunPyautoTests(pepperdir, platform, pepper_ver) 71 test_sdk.BuildStepRunPyautoTests(pepperdir, platform, pepper_ver)
61 72
62 return 0 73 return 0
63 74
64 75
65 if __name__ == '__main__': 76 if __name__ == '__main__':
66 sys.exit(main(sys.argv)) 77 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/build_sdk.py » ('j') | native_client_sdk/src/examples/debugging/example.dsc » ('J')

Powered by Google App Engine
This is Rietveld 408576698