Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: packagerChrome.py

Issue 29501558: Issue 5383 - Add tests for the Chrome and Firefox packagers (Closed)
Left Patch Set: NO CHANGE Rebasing against #4720 @ PS 4 Created Oct. 18, 2017, 11:18 a.m.
Right Patch Set: Addressing Vasily's comments Created Oct. 22, 2017, 11:11 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « package.json ('k') | tests/README.md » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # This Source Code Form is subject to the terms of the Mozilla Public 1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this 2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 4
5 import errno 5 import errno
6 import glob 6 import glob
7 import io 7 import io
8 import json 8 import json
9 import os 9 import os
10 import re 10 import re
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 else: 315 else:
316 file = outputFile 316 file = outputFile
317 if pubkey != None and signature != None: 317 if pubkey != None and signature != None:
318 file.write(struct.pack('<4sIII', 'Cr24', 2, len(pubkey), len(signature)) ) 318 file.write(struct.pack('<4sIII', 'Cr24', 2, len(pubkey), len(signature)) )
319 file.write(pubkey) 319 file.write(pubkey)
320 file.write(signature) 320 file.write(signature)
321 file.write(zipdata) 321 file.write(zipdata)
322 322
323 323
324 def add_devenv_requirements(files, metadata, params): 324 def add_devenv_requirements(files, metadata, params):
325 files.read(os.path.join(os.path.dirname(__file__), 325 files.read(
326 'chromeDevenvPoller__.js'), 326 os.path.join(os.path.dirname(__file__), 'chromeDevenvPoller__.js'),
327 relpath='devenvPoller__.js') 327 relpath='devenvPoller__.js',
328 )
328 files['devenvVersion__'] = str(random.random()) 329 files['devenvVersion__'] = str(random.random())
329 330
330 if metadata.has_option('general', 'testScripts'): 331 if metadata.has_option('general', 'testScripts'):
331 files['qunit/index.html'] = createScriptPage( 332 files['qunit/index.html'] = createScriptPage(
332 params, 'testIndex.html.tmpl', ('general', 'testScripts') 333 params, 'testIndex.html.tmpl', ('general', 'testScripts')
333 ) 334 )
334 335
335 336
336 def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuil d=False, keyFile=None, devenv=False): 337 def createBuild(baseDir, type='chrome', outFile=None, buildNum=None, releaseBuil d=False, keyFile=None, devenv=False):
337 metadata = readMetadata(baseDir, type) 338 metadata = readMetadata(baseDir, type)
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 if devenv: 380 if devenv:
380 add_devenv_requirements(files, metadata, params) 381 add_devenv_requirements(files, metadata, params)
381 382
382 zipdata = files.zipToString() 383 zipdata = files.zipToString()
383 signature = None 384 signature = None
384 pubkey = None 385 pubkey = None
385 if keyFile != None: 386 if keyFile != None:
386 signature = signBinary(zipdata, keyFile) 387 signature = signBinary(zipdata, keyFile)
387 pubkey = getPublicKey(keyFile) 388 pubkey = getPublicKey(keyFile)
388 writePackage(outFile, pubkey, signature, zipdata) 389 writePackage(outFile, pubkey, signature, zipdata)
LEFTRIGHT

Powered by Google App Engine
This is Rietveld