diff options
author | Stephen Hines <srhines@google.com> | 2017-02-07 13:02:21 -0800 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2017-02-07 13:03:24 -0800 |
commit | 870a8df6fcb12de32fa2dd83b6ed0f7b24dbab1e (patch) | |
tree | 87b3a32b13c392939d66fa93105896f5df0736a6 /binary_search_tool/test/gen_init_list.py | |
parent | baba90fd78c18585d22430dc95c748f96ad0c772 (diff) | |
parent | 058aae85dcfb12049ef90137915ec7e981288569 (diff) | |
download | toolchain-utils-870a8df6fcb12de32fa2dd83b6ed0f7b24dbab1e.tar.gz |
Merge remote-tracking branch 'aosp/mirror-chromium-master' into initial_import
Initial import of Chromium's toolchain-utils project.
Bug: http://b/31321592
Test: None necessary, as this is just a helper repository.
Change-Id: I61d2caaf1195da18cfaa7795706e8fc7fecff1d4
Diffstat (limited to 'binary_search_tool/test/gen_init_list.py')
-rwxr-xr-x | binary_search_tool/test/gen_init_list.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/binary_search_tool/test/gen_init_list.py b/binary_search_tool/test/gen_init_list.py new file mode 100755 index 00000000..4a79a1b1 --- /dev/null +++ b/binary_search_tool/test/gen_init_list.py @@ -0,0 +1,22 @@ +#!/usr/bin/python2 +"""Prints out index for every object file, starting from 0.""" + +from __future__ import print_function + +import sys + +from cros_utils import command_executer +import common + + +def Main(): + ce = command_executer.GetCommandExecuter() + _, l, _ = ce.RunCommandWOutput( + 'cat {0} | wc -l'.format(common.OBJECTS_FILE), print_to_console=False) + for i in range(0, int(l)): + print(i) + + +if __name__ == '__main__': + Main() + sys.exit(0) |