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"""Change portions of the object files to good.
8
9The "portion" is defined by the file (which is passed as the only argument to
10this script) content. Every line in the file is an object index, which will be
11set to good (mark as 0).
12"""
13
14from __future__ import print_function
15
16import sys
17
18from binary_search_tool.test import common
19
20
21def Main(argv):
22  working_set = common.ReadWorkingSet()
23  object_index = common.ReadObjectIndex(argv[1])
24
25  for oi in object_index:
26    working_set[int(oi)] = 0
27
28  common.WriteWorkingSet(working_set)
29
30  return 0
31
32
33if __name__ == '__main__':
34  retval = Main(sys.argv)
35  sys.exit(retval)
36