diff options
author | rogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 15:10:42 +0000 |
---|---|---|
committer | rogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 15:10:42 +0000 |
commit | 81c876254a8f9d0f3cbe88b313aa407afeac5c4c (patch) | |
tree | 1e8085effe44c9b858980ef845d435cc6b0a23d0 /ceee | |
parent | 6f2e3919c4709404d8d7b6742f9cd9989b799c98 (diff) | |
download | chromium_src-81c876254a8f9d0f3cbe88b313aa407afeac5c4c.zip chromium_src-81c876254a8f9d0f3cbe88b313aa407afeac5c4c.tar.gz chromium_src-81c876254a8f9d0f3cbe88b313aa407afeac5c4c.tar.bz2 |
Do not include the js-coverage.js file in Release builds of the FF CEEE.
BUG=0
TEST=None
Review URL: http://codereview.chromium.org/4482002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65202 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ceee')
-rw-r--r-- | ceee/firefox/firefox.gyp | 5 | ||||
-rw-r--r-- | ceee/firefox/zipfiles.py | 39 |
2 files changed, 42 insertions, 2 deletions
diff --git a/ceee/firefox/firefox.gyp b/ceee/firefox/firefox.gyp index 68288e5..4f0eb31 100644 --- a/ceee/firefox/firefox.gyp +++ b/ceee/firefox/firefox.gyp @@ -36,6 +36,8 @@ 'action': [ '<@(python)', '$(ProjectDir)\zipfiles.py', + '-c', + '$(ConfigurationName)', '-i', '<(SHARED_INTERMEDIATE_DIR)/ceee_ff.xpi', '-o', @@ -77,9 +79,12 @@ # one of the form "-o >(_outputs)". '<@(python)', '$(ProjectDir)\zipfiles.py', + '-c', + '$(ConfigurationName)', '-o', '<(_outputs)', '<@(_xpi_files)', + '##', '<@(_xpi_test_files)', ], }, diff --git a/ceee/firefox/zipfiles.py b/ceee/firefox/zipfiles.py index 07665f8..3ddff74 100644 --- a/ceee/firefox/zipfiles.py +++ b/ceee/firefox/zipfiles.py @@ -9,6 +9,31 @@ import shutil import sys import zipfile + +# Special token to separate the regular files needed in the XPI file from +# the debug-only files. The regular files are listed first, then the separator, +# followed by the debug only files. +_DEBUG_ONLY_FILE_SEPARATOR = '##' + + +# Usage string for option parser. +_USAGE='Usage: %prog [options] <file-list> [## <debug-only-file-list>]' + + +# Help description text for option parser. +_DESCRIPTION="""Creates a zip file containing the list of files specified on +the command line. + +The files before the ## token are always added to the zip file. The files +after the ## token are added only if the configuration specified is Debug. + +If relative paths are used to name the files, they are assumed to be relative +to the current working directory. Any directory structure will be preserved +unless the -p command line option is used to place the files in a specific +folder of the zip file. +""" + + def ParseCommandLine(): """Constructs and configures an option parser for this script and parses the command line arguments. @@ -16,19 +41,24 @@ def ParseCommandLine(): Returns: The parsed options. """ - parser = optparse.OptionParser('Usage: %prog [options] <files>') + parser = optparse.OptionParser(usage=_USAGE, description=_DESCRIPTION) parser.add_option('-i', '--input', dest='input', help='An archive file to append to.') parser.add_option('-o', '--output', dest='output', help='Output file for archive.') parser.add_option('-p', '--path', dest='path', help='Path within the archive to write the files to.') + parser.add_option('-c', '--config', dest='config', + help='Configuration being built, either Debug or Release.') (options, args) = parser.parse_args() if not options.output: parser.error('You must provide an output file.') + if not options.config: + parser.error('You must provide configuration.') + return (options, args) @@ -39,6 +69,8 @@ def Main(): # Test that all the input files exist before we blow the output archive away # only to fail part way. for path in args: + if path == _DEBUG_ONLY_FILE_SEPARATOR: + continue if not os.path.exists(path): raise Exception('Input file does not exist:', path) if os.path.isdir(path): @@ -54,7 +86,10 @@ def Main(): # Add the files to the output archive. for path in args: - if options.path: + if path == _DEBUG_ONLY_FILE_SEPARATOR: + if options.config != 'Debug': + break + elif options.path: output.write(path, os.path.join(options.path, os.path.basename(path))) else: output.write(path) |