• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python3
2# -*- coding: utf-8 -*-
3# Copyright 2020 The Chromium OS Authors. All rights reserved.
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
9from __future__ import print_function
10
11import sys
12
13from cros_utils import command_executer
14from binary_search_tool.test import common
15
16
17def Main():
18  ce = command_executer.GetCommandExecuter()
19  _, l, _ = ce.RunCommandWOutput(
20      'cat {0} | wc -l'.format(common.OBJECTS_FILE), print_to_console=False)
21  for i in range(0, int(l)):
22    print(i)
23
24
25if __name__ == '__main__':
26  Main()
27  sys.exit(0)
28