1
# Copyright 2009 Canonical Ltd. This software is licensed under the
2
# GNU Affero General Public License version 3 (see the file LICENSE).
4
"""Script to check the size of the generated javascript.
6
This script tests to ensure optimized javascript never gets over a certain
7
size. If it gets too big, Windmill has issues. This is a hack until we can
8
find out why Windmill has such issues.
13
FILE_NAME = 'lib/canonical/launchpad/icing/build/launchpad.js'
14
MAX_FILE_SIZE = 512000
17
size = os.path.getsize(FILE_NAME)
18
if size > MAX_FILE_SIZE:
20
'launchpad.js is greater than %d bytes' % MAX_FILE_SIZE)