diff options
Diffstat (limited to 'tensorflow/tools/pip_package/check_load_py_test.py')
-rw-r--r-- | tensorflow/tools/pip_package/check_load_py_test.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tensorflow/tools/pip_package/check_load_py_test.py b/tensorflow/tools/pip_package/check_load_py_test.py index 7a132a8de3..79d11b08ce 100644 --- a/tensorflow/tools/pip_package/check_load_py_test.py +++ b/tensorflow/tools/pip_package/check_load_py_test.py @@ -42,11 +42,11 @@ def main(): # Get all py_test target, note bazel query result will also include # cuda_py_test etc. try: - targets = subprocess.check_output( - 'bazel query "kind(py_test, //tensorflow/contrib/... + ' + targets = subprocess.check_output([ + 'bazel', 'query', + 'kind(py_test, //tensorflow/contrib/... + ' '//tensorflow/python/... - ' - '//tensorflow/contrib/tensorboard/...)"', - shell=True).strip() + '//tensorflow/contrib/tensorboard/...)']).strip() except subprocess.CalledProcessError as e: targets = e.output @@ -68,9 +68,8 @@ def main(): files_missing_load = [] for build_file in build_files: updated_build_file = subprocess.check_output( - 'buildozer -stdout "new_load //tensorflow:tensorflow.bzl py_test" ' + - build_file, - shell=True) + ['buildozer', '-stdout', 'new_load //tensorflow:tensorflow.bzl py_test', + build_file]) with open(build_file, 'r') as f: if f.read() != updated_build_file: files_missing_load.append(build_file) |