Skip to content

Commit

Permalink
Replace pip testing script with bazel.
Browse files Browse the repository at this point in the history
Change: 147423640
  • Loading branch information
gunan authored and tensorflower-gardener committed Feb 14, 2017
1 parent 74d516c commit b71f113
Show file tree
Hide file tree
Showing 39 changed files with 199 additions and 607 deletions.
2 changes: 2 additions & 0 deletions tensorflow/contrib/copy_graph/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ exports_files(["LICENSE"])

package(default_visibility = ["//tensorflow:__subpackages__"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "copy_graph_py",
srcs = [
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/deprecated/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ exports_files(["LICENSE"])

package(default_visibility = ["//tensorflow:__subpackages__"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "deprecated_py",
srcs = [
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/distributions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ cuda_py_test(
"//tensorflow/python:platform_test",
"//tensorflow/python:random_ops",
],
tags = ["no_pip"],
)

cuda_py_test(
Expand Down Expand Up @@ -653,6 +654,7 @@ cuda_py_test(
"//tensorflow/python:math_ops",
"//tensorflow/python:platform_test",
],
tags = ["no_pip"],
)

cuda_py_test(
Expand Down
1 change: 1 addition & 0 deletions tensorflow/contrib/framework/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ package(default_visibility = [
])

load("//tensorflow:tensorflow.bzl", "cuda_py_test")
load("//tensorflow:tensorflow.bzl", "py_test")
load("//tensorflow:tensorflow.bzl", "tf_custom_op_library")
load("//tensorflow:tensorflow.bzl", "tf_gen_op_wrapper_py")
load("//tensorflow:tensorflow.bzl", "tf_gen_op_libs")
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/graph_editor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ exports_files(["LICENSE"])

package(default_visibility = ["//tensorflow:__subpackages__"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "graph_editor_py",
srcs = [
Expand Down
1 change: 1 addition & 0 deletions tensorflow/contrib/input_pipeline/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package(default_visibility = ["//visibility:public"])

load(
"//tensorflow:tensorflow.bzl",
"py_test",
"tf_custom_op_library",
"tf_cc_tests",
"tf_gen_op_libs",
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/integrate/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ exports_files(["LICENSE"])

package(default_visibility = ["//tensorflow:__subpackages__"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "integrate_py",
srcs = [
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/labeled_tensor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ exports_files(["LICENSE"])

package(default_visibility = ["//tensorflow:__subpackages__"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "labeled_tensor",
srcs = ["__init__.py"],
Expand Down
1 change: 1 addition & 0 deletions tensorflow/contrib/layers/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ package(default_visibility = [
])

load("//tensorflow:tensorflow.bzl", "cuda_py_test")
load("//tensorflow:tensorflow.bzl", "py_test")
load("//tensorflow:tensorflow.bzl", "tf_custom_op_library")
load("//tensorflow:tensorflow.bzl", "tf_gen_op_libs")
load("//tensorflow:tensorflow.bzl", "tf_gen_op_wrapper_py")
Expand Down
3 changes: 3 additions & 0 deletions tensorflow/contrib/learn/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ package(default_visibility = [
"//tensorflow:__subpackages__",
])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "learn",
srcs = [
Expand Down Expand Up @@ -746,6 +748,7 @@ py_test(
srcs = ["python/learn/estimators/linear_test.py"],
shard_count = 4,
srcs_version = "PY2AND3",
tags = ["no_pip"],
deps = [
":learn",
"//tensorflow/contrib/layers:layers_py",
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/learn/python/learn/datasets/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ licenses(["notice"]) # Apache 2.0

exports_files(["LICENSE"])

load("//tensorflow:tensorflow.bzl", "py_test")

filegroup(
name = "data_csv",
srcs = glob(["data/*.csv"]),
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/linear_optimizer/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ exports_files(["LICENSE"])

package(default_visibility = ["//tensorflow:__subpackages__"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "sdca_ops_py",
srcs = [
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/lookup/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ exports_files(["LICENSE"])

package(default_visibility = ["//tensorflow:internal"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "lookup_py",
srcs = [
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/losses/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ exports_files(["LICENSE"])

package(default_visibility = ["//tensorflow:__subpackages__"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "losses_py",
srcs = [
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/metrics/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ package(default_visibility = [
"//tensorflow:__subpackages__",
])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "metrics_py",
srcs = [
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/opt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ exports_files(["LICENSE"])

package(default_visibility = ["//tensorflow:__subpackages__"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "opt_py",
srcs = [
Expand Down
3 changes: 3 additions & 0 deletions tensorflow/contrib/session_bundle/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ load(
"if_ios",
"if_mobile",
"if_not_mobile",
"py_test",
)

filegroup(
Expand Down Expand Up @@ -68,6 +69,7 @@ py_test(
],
main = "bundle_shim_test.py",
srcs_version = "PY2AND3",
tags = ["no_pip"],
deps = [
":bundle_shim_py",
":constants",
Expand Down Expand Up @@ -248,6 +250,7 @@ py_test(
data = [":session_bundle_half_plus_two"],
main = "session_bundle_test.py",
srcs_version = "PY2AND3",
tags = ["no_pip"],
deps = [
":constants",
":manifest_proto_py",
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/slim/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ exports_files(["LICENSE"])

package(default_visibility = ["//tensorflow:__subpackages__"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "evaluation",
srcs = ["python/slim/evaluation.py"],
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/slim/python/slim/data/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ exports_files(["LICENSE"])

package(default_visibility = ["//tensorflow:__subpackages__"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "data",
deps = [
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/slim/python/slim/nets/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ licenses(["notice"]) # Apache 2.0

exports_files(["LICENSE"])

load("//tensorflow:tensorflow.bzl", "py_test")

package(
default_visibility = [
"//tensorflow:__subpackages__",
Expand Down
1 change: 1 addition & 0 deletions tensorflow/contrib/tensor_forest/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package(default_visibility = [
"//visibility:public",
])

load("//tensorflow:tensorflow.bzl", "py_test")
load("//tensorflow:tensorflow.bzl", "tf_gen_op_libs")
load("//tensorflow:tensorflow.bzl", "tf_gen_op_wrapper_py")
load("//tensorflow:tensorflow.bzl", "tf_custom_op_library")
Expand Down
1 change: 1 addition & 0 deletions tensorflow/contrib/tensor_forest/hybrid/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package(default_visibility = [
"//visibility:public",
])

load("//tensorflow:tensorflow.bzl", "py_test")
load("//tensorflow:tensorflow.bzl", "tf_custom_op_library")

filegroup(
Expand Down
1 change: 1 addition & 0 deletions tensorflow/contrib/tensorboard/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ exports_files(["LICENSE"])

# For platform specific build config
load("//tensorflow/core:platform/default/build_config.bzl", "tf_proto_library")
load("//tensorflow:tensorflow.bzl", "py_test")

tf_proto_library(
name = "protos_all",
Expand Down
1 change: 1 addition & 0 deletions tensorflow/contrib/tfprof/python/tools/tfprof/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ licenses(["notice"]) # Apache 2.0

package(default_visibility = ["//visibility:public"])

load("//tensorflow:tensorflow.bzl", "py_test")
load("//tensorflow:tensorflow.bzl", "tf_py_test")
load("//tensorflow:tensorflow.bzl", "tf_py_wrap_cc")

Expand Down
2 changes: 2 additions & 0 deletions tensorflow/contrib/training/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ exports_files(["LICENSE"])

package(default_visibility = ["//tensorflow:__subpackages__"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "training_py",
srcs = [
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/examples/image_retraining/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ licenses(["notice"]) # Apache 2.0

exports_files(["LICENSE"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_binary(
name = "retrain",
srcs = [
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/examples/tutorials/mnist/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ licenses(["notice"]) # Apache 2.0

exports_files(["LICENSE"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "package",
srcs = [
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ py_test(
srcs = ["framework/ops_test.py"],
main = "framework/ops_test.py",
srcs_version = "PY2AND3",
tags = ["no_pip"], # test_ops_2 is not available in pip.
deps = [
":control_flow_ops",
":errors",
Expand Down Expand Up @@ -2157,6 +2158,7 @@ py_test(
srcs = ["util/protobuf/compare_test.py"],
main = "util/protobuf/compare_test.py",
srcs_version = "PY2AND3",
tags = ["no_pip"], # compare_test_pb2 proto is not available in pip.
deps = [
":compare_test_proto_py",
":platform_test",
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/tensorboard/backend/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ licenses(["notice"]) # Apache 2.0

exports_files(["LICENSE"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "application",
srcs = ["application.py"],
Expand Down
2 changes: 2 additions & 0 deletions tensorflow/tensorboard/lib/python/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ licenses(["notice"]) # Apache 2.0

exports_files(["LICENSE"])

load("//tensorflow:tensorflow.bzl", "py_test")

py_library(
name = "http_util",
srcs = ["http_util.py"],
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tools/ci_build/builds/docker_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ fi
docker run -v ${BASE_DIR}:/tensorflow-src -w /tensorflow-src \
${GPU_EXTRA_PARAMS} \
"${DOCKER_IMG_TAG}" \
/bin/bash -c "tensorflow/tools/ci_build/builds/test_installation.sh && "\
/bin/bash -c "tensorflow/tools/ci_build/builds/run_pip_tests.sh && "\
"tensorflow/tools/ci_build/builds/test_tutorials.sh && "\
"tensorflow/tools/ci_bukld/builds/integration_tests.sh"

Expand Down
6 changes: 3 additions & 3 deletions tensorflow/tools/ci_build/builds/pip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# script to perform bazel clean prior to main build and test steps.
#
# TF_BUILD_INSTALL_EXTRA_PIP_PACKAGES overrides the default extra pip packages
# to be installed in virtualenv before test_installation.sh is called. Multiple
# to be installed in virtualenv before run_pip_tests.sh is called. Multiple
# pakcage names are separated with spaces.
#
# If NO_TEST_ON_INSTALL has any non-empty and non-0 value, the test-on-install
Expand Down Expand Up @@ -268,8 +268,8 @@ if [[ ! -z "${NO_TEST_ON_INSTALL}" ]] &&
echo "NO_TEST_ON_INSTALL=${NO_TEST_ON_INSTALL}:"
echo " Skipping ALL Python unit tests on install"
else
# Call test_installation.sh to perform test-on-install
"${SCRIPT_DIR}/test_installation.sh" --virtualenv ${GPU_FLAG} ${MAC_FLAG} ||
# Call run_pip_tests.sh to perform test-on-install
"${SCRIPT_DIR}/run_pip_tests.sh" --virtualenv ${GPU_FLAG} ${MAC_FLAG} ||
die "PIP tests-on-install FAILED"
fi

Expand Down
Loading

0 comments on commit b71f113

Please sign in to comment.