aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tensorflow.bzl
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-12-15 17:32:50 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-12-15 17:39:26 -0800
commit9648f8040a559f6cf9bbe0501ba96f2b2c2864b1 (patch)
tree57dc6e959e0a534622eaf392ee43b7691378b10e /tensorflow/tensorflow.bzl
parent5b5445b9a7aa2664a90c4fc946ecf268c971425b (diff)
Automated g4 rollback of changelist 179258973
PiperOrigin-RevId: 179260538
Diffstat (limited to 'tensorflow/tensorflow.bzl')
-rw-r--r--tensorflow/tensorflow.bzl43
1 files changed, 9 insertions, 34 deletions
diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl
index 9b13a86ed3..611d50bc52 100644
--- a/tensorflow/tensorflow.bzl
+++ b/tensorflow/tensorflow.bzl
@@ -130,13 +130,6 @@ def if_not_windows(a):
"//conditions:default": a,
})
-def if_windows(a):
- return select({
- clean_dep("//tensorflow:windows"): a,
- clean_dep("//tensorflow:windows_msvc"): a,
- "//conditions:default": [],
- })
-
def if_linux_x86_64(a):
return select({
clean_dep("//tensorflow:linux_x86_64"): a,
@@ -1332,32 +1325,11 @@ def tf_py_wrap_cc(name,
"//conditions:default": [":" + cc_library_name],
}))
-# This macro is for running python tests against system installed pip package
-# on Windows.
-#
-# py_test is built as an exectuable python zip file on Windows, which contains all
-# dependencies of the target. Because of the C++ extensions, it would be very
-# inefficient if the py_test zips all runfiles, plus we don't need them when running
-# tests against system installed pip package. So we'd like to get rid of the deps
-# of py_test in this case.
-#
-# In order to trigger the tests without bazel clean after getting rid of deps,
-# we introduce the following :
-# 1. When --define=no_tensorflow_py_deps=true, the py_test depends on a marker
-# file of the pip package, the test gets to rerun when the pip package change.
-# Note that this only works on Windows. See the definition of
-# //tensorflow/tools/pip_package:win_pip_package_marker for specific reasons.
-# 2. When --define=no_tensorflow_py_deps=false (by default), it's a normal py_test.
-def py_test(deps=[], data=[], **kwargs):
+def py_test(deps=[], **kwargs):
native.py_test(
deps=select({
"//conditions:default": deps,
- clean_dep("//tensorflow:no_tensorflow_py_deps"): [],
- }),
- data = data + select({
- "//conditions:default": [],
- clean_dep("//tensorflow:no_tensorflow_py_deps"):
- ["//tensorflow/tools/pip_package:win_pip_package_marker"],
+ clean_dep("//tensorflow:no_tensorflow_py_deps"): []
}),
**kwargs)
@@ -1382,7 +1354,7 @@ def tf_py_test(name,
additional_deps = additional_deps + tf_additional_xla_deps_py()
if grpc_enabled:
additional_deps = additional_deps + tf_additional_grpc_deps_py()
- py_test(
+ native.py_test(
name=name,
size=size,
srcs=srcs,
@@ -1392,10 +1364,13 @@ def tf_py_test(name,
visibility=[clean_dep("//tensorflow:internal")],
shard_count=shard_count,
data=data,
- deps=[
- clean_dep("//tensorflow/python:extra_py_tests_deps"),
- clean_dep("//tensorflow/python:gradient_checker"),
+ deps=select({
+ "//conditions:default": [
+ clean_dep("//tensorflow/python:extra_py_tests_deps"),
+ clean_dep("//tensorflow/python:gradient_checker"),
] + additional_deps,
+ clean_dep("//tensorflow:no_tensorflow_py_deps"): []
+ }),
flaky=flaky,
srcs_version="PY2AND3")