aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/lite/testing/BUILD
diff options
context:
space:
mode:
authorGravatar Austin Anderson <angerson@google.com>2018-05-21 17:45:22 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-21 17:48:18 -0700
commit7c3cd0842a41aac47069dcf14567b88c32ea7b28 (patch)
tree82d44064de864a532ededda9e30cef3717f74a02 /tensorflow/contrib/lite/testing/BUILD
parentb1139814f91c5216eb5ff229ee7e1982e5f4e888 (diff)
Split generated_examples test into multiple test targets
PiperOrigin-RevId: 197490872
Diffstat (limited to 'tensorflow/contrib/lite/testing/BUILD')
-rw-r--r--tensorflow/contrib/lite/testing/BUILD142
1 files changed, 48 insertions, 94 deletions
diff --git a/tensorflow/contrib/lite/testing/BUILD b/tensorflow/contrib/lite/testing/BUILD
index 480685f4e9..74fc32a12b 100644
--- a/tensorflow/contrib/lite/testing/BUILD
+++ b/tensorflow/contrib/lite/testing/BUILD
@@ -6,7 +6,8 @@ licenses(["notice"]) # Apache 2.0
load(
"//tensorflow/contrib/lite:build_def.bzl",
- "gen_zipped_test_files",
+ "gen_zip_test",
+ "generated_test_models",
)
load("//tensorflow/contrib/lite:special_rules.bzl", "tflite_portable_test_suite")
load(
@@ -14,61 +15,52 @@ load(
"tf_cc_test",
)
-gen_zipped_test_files(
- name = "optest",
- files = [
- "add.zip",
- "arg_max.zip",
- "avg_pool.zip",
- "batch_to_space_nd.zip",
- "concat.zip",
- "constant.zip",
- "control_dep.zip",
- "conv.zip",
- "depthwiseconv.zip",
- "div.zip",
- "exp.zip",
- "floor.zip",
- "fully_connected.zip",
- "fused_batch_norm.zip",
- "gather.zip",
- "global_batch_norm.zip",
- "greater.zip",
- "greater_equal.zip",
- "l2_pool.zip",
- "l2norm.zip",
- "less.zip",
- "less_equal.zip",
- "local_response_norm.zip",
- "log_softmax.zip",
- "max_pool.zip",
- "maximum.zip",
- "mean.zip",
- "minimum.zip",
- "mul.zip",
- "neg.zip",
- "pad.zip",
- "padv2.zip",
- "relu.zip",
- "relu1.zip",
- "relu6.zip",
- "reshape.zip",
- "resize_bilinear.zip",
- "sigmoid.zip",
- "sin.zip",
- "slice.zip",
- "softmax.zip",
- "space_to_batch_nd.zip",
- "space_to_depth.zip",
- "split.zip",
- "squeeze.zip",
- "strided_slice.zip",
- "strided_slice_1d_exhaustive.zip",
- "sub.zip",
- "topk.zip",
- "transpose.zip",
- "transpose_conv.zip",
- "where.zip",
+[gen_zip_test(
+ name = "zip_test_%s" % test_name,
+ size = "large",
+ srcs = ["generated_examples_zip_test.cc"],
+ args = [
+ "--zip_file_path=$(location :zip_%s)" % test_name,
+ # TODO(angerson) We may be able to add an external unzip binary instead
+ # of relying on an existing one for OSS builds.
+ "--unzip_binary_path=/usr/bin/unzip",
+ ],
+ data = [
+ ":zip_%s" % test_name,
+ ],
+ shard_count = 20,
+ tags = [
+ "gen_zip_test",
+ "no_oss",
+ "tflite_not_portable",
+ ],
+ test_name = test_name,
+ deps = [
+ ":parse_testdata_lib",
+ ":tflite_driver",
+ ":util",
+ "@com_google_googletest//:gtest",
+ "@com_googlesource_code_re2//:re2",
+ "//tensorflow/contrib/lite:builtin_op_data",
+ "//tensorflow/contrib/lite:framework",
+ "//tensorflow/contrib/lite/kernels:builtin_ops",
+ ] + select({
+ "//conditions:default": [
+ "//tensorflow/core:framework_internal",
+ "//tensorflow/core:lib",
+ "//tensorflow/core:test",
+ ],
+ "//tensorflow:android": [
+ "//tensorflow/core:android_tensorflow_lib",
+ "//tensorflow/core:android_tensorflow_test_lib",
+ ],
+ }),
+) for test_name in generated_test_models()]
+
+test_suite(
+ name = "generated_zip_tests",
+ tags = [
+ "gen_zip_test",
],
)
@@ -353,42 +345,4 @@ cc_binary(
],
)
-tf_cc_test(
- name = "generated_examples_zip_test",
- size = "large",
- srcs = ["generated_examples_zip_test.cc"],
- args = [
- "--zip_files_dir=tensorflow/contrib/lite/testing/optest",
- # TODO(angerson) We may be able to add an external unzip binary instead
- # of relying on an existing one for OSS builds.
- "--unzip_binary_path=/usr/bin/unzip",
- ],
- data = [":optest"],
- shard_count = 20,
- tags = [
- "no_oss",
- "tflite_not_portable",
- ],
- deps = [
- ":parse_testdata_lib",
- ":tflite_driver",
- ":util",
- "@com_google_googletest//:gtest",
- "@com_googlesource_code_re2//:re2",
- "//tensorflow/contrib/lite:builtin_op_data",
- "//tensorflow/contrib/lite:framework",
- "//tensorflow/contrib/lite/kernels:builtin_ops",
- ] + select({
- "//conditions:default": [
- "//tensorflow/core:framework_internal",
- "//tensorflow/core:lib",
- "//tensorflow/core:test",
- ],
- "//tensorflow:android": [
- "//tensorflow/core:android_tensorflow_lib",
- "//tensorflow/core:android_tensorflow_test_lib",
- ],
- }),
-)
-
tflite_portable_test_suite()