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

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

Issue 9407015: Revert 122113 - Fix pnacl SDK builder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 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
« no previous file with comments | « build/download_nacl_toolchains.py ('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
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 """Entry point for both build and try bots 6 """Entry point for both build and try bots
7 7
8 This script is invoked from XXX, usually without arguments 8 This script is invoked from XXX, usually without arguments
9 to package an SDK. It automatically determines whether 9 to package an SDK. It automatically determines whether
10 this SDK is for mac, win, linux. 10 this SDK is for mac, win, linux.
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 action='store_true', dest='skip_tar', default=False) 473 action='store_true', dest='skip_tar', default=False)
474 parser.add_option('--archive', help='Force the archive step.', 474 parser.add_option('--archive', help='Force the archive step.',
475 action='store_true', dest='archive', default=False) 475 action='store_true', dest='archive', default=False)
476 parser.add_option('--release', help='PPAPI release version.', 476 parser.add_option('--release', help='PPAPI release version.',
477 dest='release', default=None) 477 dest='release', default=None)
478 478
479 options, args = parser.parse_args(args[1:]) 479 options, args = parser.parse_args(args[1:])
480 platform = getos.GetPlatform() 480 platform = getos.GetPlatform()
481 arch = 'x86' 481 arch = 'x86'
482 482
483 if not options.pnacl: 483 toolchains = ['newlib', 'glibc']
484 toolchains = ['newlib', 'glibc'] 484 if options.pnacl:
485 else: 485 toolchains.append('pnacl')
486 toolchains = ['pnacl'] 486
487 print 'Building: ' + ' '.join(toolchains)
488 skip = options.examples or options.update 487 skip = options.examples or options.update
489 488
490 skip_examples = skip 489 skip_examples = skip
491 skip_update = skip 490 skip_update = skip
492 skip_untar = skip 491 skip_untar = skip
493 skip_build = skip 492 skip_build = skip
494 skip_tar = skip or options.skip_tar 493 skip_tar = skip or options.skip_tar
495 494
496 if options.examples: skip_examples = False 495 if options.examples: skip_examples = False
497 if options.update: skip_update = False 496 if options.update: skip_update = False
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 BuildStep('Add MAKE') 533 BuildStep('Add MAKE')
535 http_download.HttpDownload(GSTORE + MAKE, 534 http_download.HttpDownload(GSTORE + MAKE,
536 os.path.join(pepperdir, 'tools' ,'make.exe')) 535 os.path.join(pepperdir, 'tools' ,'make.exe'))
537 536
538 if not skip_examples: 537 if not skip_examples:
539 CopyExamples(pepperdir, toolchains) 538 CopyExamples(pepperdir, toolchains)
540 539
541 if not skip_tar: 540 if not skip_tar:
542 BuildStep('Tar Pepper Bundle') 541 BuildStep('Tar Pepper Bundle')
543 tarname = 'naclsdk_' + platform + '.bz2' 542 tarname = 'naclsdk_' + platform + '.bz2'
544 if 'pnacl' in toolchains:
545 tarname = 'p' + tarname
546 tarfile = os.path.join(OUT_DIR, tarname) 543 tarfile = os.path.join(OUT_DIR, tarname)
547 Run([sys.executable, CYGTAR, '-C', OUT_DIR, '-cjf', tarfile, 544 Run([sys.executable, CYGTAR, '-C', OUT_DIR, '-cjf', tarfile,
548 'pepper_' + pepper_ver], cwd=NACL_DIR) 545 'pepper_' + pepper_ver], cwd=NACL_DIR)
549 546
550 # Archive on non-trybots. 547 # Archive on non-trybots.
551 if options.archive or '-sdk' in os.environ.get('BUILDBOT_BUILDERNAME', ''): 548 if options.archive or '-sdk' in os.environ.get('BUILDBOT_BUILDERNAME', ''):
552 BuildStep('Archive build') 549 BuildStep('Archive build')
553 Archive(tarname) 550 Archive(tarname)
554 551
555 if not skip_examples: 552 if not skip_examples:
556 BuildStep('Test Build Examples') 553 BuildStep('Test Build Examples')
557 filelist = os.listdir(os.path.join(pepperdir, 'examples')) 554 filelist = os.listdir(os.path.join(pepperdir, 'examples'))
558 for filenode in filelist: 555 for filenode in filelist:
559 dirnode = os.path.join(pepperdir, 'examples', filenode) 556 dirnode = os.path.join(pepperdir, 'examples', filenode)
560 makefile = os.path.join(dirnode, 'Makefile') 557 makefile = os.path.join(dirnode, 'Makefile')
561 if os.path.isfile(makefile): 558 if os.path.isfile(makefile):
562 print "\n\nMake: " + dirnode 559 print "\n\nMake: " + dirnode
563 Run(['make', 'all', '-j8'], cwd=os.path.abspath(dirnode), shell=True) 560 Run(['make', 'all', '-j8'], cwd=os.path.abspath(dirnode), shell=True)
564 561
565 # Build SDK Tools 562 # Build SDK Tools
566 # if not skip_update: 563 # if not skip_update:
567 # BuildUpdater() 564 # BuildUpdater()
568 565
569 return 0 566 return 0
570 567
571 568
572 if __name__ == '__main__': 569 if __name__ == '__main__':
573 sys.exit(main(sys.argv)) 570 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/download_nacl_toolchains.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698