diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2020-01-03 14:29:41 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-07 00:17:10 +0000 |
commit | cee40844bcbd751ca854cae30cb6756c446880cd (patch) | |
tree | 68b6449b4ee410f4ba28fe0da6b5d168addc78f1 /util/chargen | |
parent | 943645d993c88754b2db1e86734210256c505e07 (diff) | |
download | chrome-ec-cee40844bcbd751ca854cae30cb6756c446880cd.tar.gz |
utils/extras: do not build unnecessary tools
The vast majority of tools built from the ./util directory and many
built from ./extra/usb_updater directory are not used by Cr50, let's
not build them.
Also eliminating some irrelevant pre-upload checks.
BRANCH=cr50, cr50-mp
BUG=b:145912698
TEST=verified that all the following commands succeed:
make buildall -j
make BOARD=cr50 CR50_DEV=1 -j
make BOARD=cr50 CR50_SQA=1 -j
make -C extra/usb_updater
Change-Id: I0040ceab95ad280bda86ef599b3e902addcbdcde
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986943
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
Diffstat (limited to 'util/chargen')
-rw-r--r-- | util/chargen | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/util/chargen b/util/chargen deleted file mode 100644 index 42c40f13e4..0000000000 --- a/util/chargen +++ /dev/null @@ -1,69 +0,0 @@ -#!/usr/bin/env python2 -# Copyright 2019 The Chromium OS Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import sys - -def chargen(modulo, max_chars): - """Generate a stream of characters on the console. - - The stream is an ever incrementing pattern of characters from the - following set: 0..9A..Za..z. - - Args: - modulo: an int, restart the pattern every modulo characters, if - modulo is non zero - max_chars: an int, stop printing after this number of characters if non - zero, if zero - print indefinitely - """ - - base = '0' - c = base - counter = 0 - while True: - sys.stdout.write(c) - counter = counter + 1 - - if (max_chars != 0) and (counter == max_chars): - sys.stdout.write('\n') - return - - if modulo and ((counter % modulo) == 0): - c = base - continue - - if c == 'z': - c = base - elif c == 'Z': - c = 'a' - elif c == '9': - c = 'A' - else: - c = '%c' % (ord(c) + 1) - - -def main(args): - '''Process command line arguments and invoke chargen if args are valid''' - - modulo = 0 - max_chars = 0 - - try: - if len(args) > 0: - modulo = int(args[0]) - if len(args) > 1: - max_chars = int(args[1]) - except ValueError: - sys.stderr.write('usage %s:' - "['seq_length' ['max_chars']]\n") - sys.exit(1) - - try: - chargen(modulo, max_chars) - except KeyboardInterrupt: - print - -if __name__ == '__main__': - main(sys.argv[1:]) - sys.exit(0) |