diff options
author | elijahtaylor@google.com <elijahtaylor@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-02 16:11:13 +0000 |
---|---|---|
committer | elijahtaylor@google.com <elijahtaylor@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-02 16:11:13 +0000 |
commit | dd366c116cd17cfa934982e6fa6766237ff356e7 (patch) | |
tree | 93850c18700a34616ea755380e5f4736aacf0d57 /native_client_sdk | |
parent | c4263add616f16c9415c9b8cf1844307d32c2224 (diff) | |
download | chromium_src-dd366c116cd17cfa934982e6fa6766237ff356e7.zip chromium_src-dd366c116cd17cfa934982e6fa6766237ff356e7.tar.gz chromium_src-dd366c116cd17cfa934982e6fa6766237ff356e7.tar.bz2 |
Archive nacl mono build with pepper version in both archive name and archive contents. This allows pepper to be installed alongside other naclsdk bundles.
BUG=115363
TEST=manual/bots
This change only affects the Native Client SDK.
Review URL: https://chromiumcodereview.appspot.com/9918029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130135 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rw-r--r-- | native_client_sdk/src/build_tools/nacl-mono-archive.py | 21 | ||||
-rw-r--r-- | native_client_sdk/src/build_tools/nacl-mono-buildbot.py | 3 |
2 files changed, 19 insertions, 5 deletions
diff --git a/native_client_sdk/src/build_tools/nacl-mono-archive.py b/native_client_sdk/src/build_tools/nacl-mono-archive.py index b2b06a6b..36d80ca 100644 --- a/native_client_sdk/src/build_tools/nacl-mono-archive.py +++ b/native_client_sdk/src/build_tools/nacl-mono-archive.py @@ -20,22 +20,33 @@ def main(args): parser.add_option('--tar-path', help='Tarfile path', dest='tar_path', - default='naclmono.bz2') + default='naclmono_%pepperrev%.bz2') parser.add_option('--sdk-revision', help='SDK Revision', dest='sdk_revision', - default='X') + default=None) + parser.add_option('--pepper-revision', + help='Pepper revision', + dest='pepper_revision', + default=None) parser.add_option('--skip-upload', help='Skips upload step', action="store_true", dest='skip_upload') (options, args) = parser.parse_args(args[1:]) - if options.sdk_revision == 'X': + if not options.sdk_revision: buildbot_common.ErrorExit('--sdk-revision is required') + if not options.pepper_revision: + buildbot_common.ErrorExit('--pepper-revision is required') + + options.tar_path = options.tar_path.replace('%pepperrev%', + options.pepper_revision) install_folders = ['bin', 'etc', 'include', 'lib', 'lib32', 'share'] + root_dir = 'mono_pepper_' + options.pepper_revision + buildbot_common.BuildStep('Archive Build') tar_file = None buildbot_common.RemoveFile(options.tar_path) @@ -43,7 +54,7 @@ def main(args): tar_file = tarfile.open(options.tar_path, mode='w:bz2') for subfolder in install_folders: tar_file.add(os.path.join(options.install_dir, subfolder), - arcname=subfolder) + arcname=os.path.join(root_dir, subfolder)) finally: if tar_file: tar_file.close() @@ -51,7 +62,7 @@ def main(args): if not options.skip_upload: buildbot_common.Archive(os.path.basename(options.tar_path), 'nativeclient-mirror/nacl/nacl_sdk/%s' % options.sdk_revision, - cwd=os.path.dirname(options.tar_path)) + cwd=os.path.dirname(os.path.abspath(options.tar_path))) if __name__ == '__main__': sys.exit(main(sys.argv)) diff --git a/native_client_sdk/src/build_tools/nacl-mono-buildbot.py b/native_client_sdk/src/build_tools/nacl-mono-buildbot.py index 40266cd..4ff8c38 100644 --- a/native_client_sdk/src/build_tools/nacl-mono-buildbot.py +++ b/native_client_sdk/src/build_tools/nacl-mono-buildbot.py @@ -7,6 +7,7 @@ import os import sys import buildbot_common +import build_utils def main(args): @@ -15,6 +16,7 @@ def main(args): buildbot_revision = os.environ.get('BUILDBOT_REVISION', '') assert buildbot_revision sdk_revision = buildbot_revision.split(':')[0] + pepper_revision = build_utils.ChromeMajorVersion() install_dir = 'naclmono' buildbot_common.RemoveDir(install_dir) @@ -25,6 +27,7 @@ def main(args): '--arch', 'x86-64', '--install-dir', install_dir] + args) buildbot_common.Run([sys.executable, 'nacl-mono-archive.py', '--sdk-revision', sdk_revision, + '--pepper-revision', pepper_revision, '--install-dir', install_dir] + args) |