xref: /aosp_15_r20/external/toolchain-utils/binary_search_tool/test/is_good.py (revision 760c253c1ed00ce9abd48f8546f08516e57485fe)
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"""Check to see if the working set produces a good executable."""
8
9
10import os
11import sys
12
13from binary_search_tool.test import common
14
15
16def Main():
17    if not os.path.exists("./is_setup"):
18        return 1
19    working_set = common.ReadWorkingSet()
20    for w in working_set:
21        if w == 1:
22            return 1  ## False, linking failure
23    return 0
24
25
26if __name__ == "__main__":
27    retval = Main()
28    sys.exit(retval)
29