1#!/usr/bin/env python3 2# -*- coding: utf-8 -*- 3# Copyright 2020 The ChromiumOS Authors 4# Use of this source code is governed by a BSD-style license that can be 5# found in the LICENSE file. 6 7"""Prints out index for every object file, starting from 0.""" 8 9 10import sys 11 12from cros_utils import command_executer 13from binary_search_tool.test import common 14 15 16def Main(): 17 ce = command_executer.GetCommandExecuter() 18 _, l, _ = ce.RunCommandWOutput( 19 "cat {0} | wc -l".format(common.OBJECTS_FILE), print_to_console=False 20 ) 21 for i in range(0, int(l)): 22 print(i) 23 24 25if __name__ == "__main__": 26 Main() 27 sys.exit(0) 28