diff options
author | Cassidy Burden <cburden@google.com> | 2016-06-24 13:14:01 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-06-28 15:27:23 -0700 |
commit | 2e37b144ecd1476964e2dc72ac6b5b2a81a32018 (patch) | |
tree | aae5582a2e55e47efe9b8886d6948cff39ca369b /binary_search_tool/bisect.py | |
parent | 314ea5683c0b4c7658f6c3f659cb5c53218a613c (diff) | |
download | toolchain-utils-2e37b144ecd1476964e2dc72ac6b5b2a81a32018.tar.gz |
Add common module for binary search tool
common module holds common logic between bisect and
binary_search_state for adding utils to PYTHONPATH
and for building the argument parser.
TEST=Run unit tests, run cros_pkg system test
Change-Id: I4085b28de011132c53b8fddf06e8745042ef8ea2
Reviewed-on: https://chrome-internal-review.googlesource.com/266996
Commit-Ready: Cassidy Burden <cburden@google.com>
Tested-by: Cassidy Burden <cburden@google.com>
Reviewed-by: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'binary_search_tool/bisect.py')
-rwxr-xr-x | binary_search_tool/bisect.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/binary_search_tool/bisect.py b/binary_search_tool/bisect.py index 007531c6..be6db75e 100755 --- a/binary_search_tool/bisect.py +++ b/binary_search_tool/bisect.py @@ -5,17 +5,9 @@ from __future__ import print_function import abc import argparse -import os import sys +import common -if os.path.isabs(sys.argv[0]): - utils_pythonpath = os.path.abspath('{0}/..'.format(os.path.dirname(sys.argv[ - 0]))) -else: - wdir = os.getcwd() - utils_pythonpath = os.path.abspath('{0}/{1}/..'.format(wdir, os.path.dirname( - sys.argv[0]))) -sys.path.append(utils_pythonpath) from utils import command_executer from utils import logger |