1# Tests of TensorFlow custom ops written 2 3load("//tensorflow:tensorflow.bzl", "tf_custom_op_library") 4load("//tensorflow:tensorflow.bzl", "tf_py_test") 5 6package( 7 default_visibility = ["//tensorflow:internal"], 8 licenses = ["notice"], 9) 10 11# Custom op tests 12tf_custom_op_library( 13 name = "ackermann_op.so", 14 srcs = ["ackermann_op.cc"], 15) 16 17tf_py_test( 18 name = "ackermann_test", 19 size = "small", 20 srcs = ["ackermann_test.py"], 21 data = [":ackermann_op.so"], 22 tags = [ 23 "no_pip", 24 "notap", 25 ], 26 deps = [ 27 "//tensorflow/python:client_testlib", 28 "//tensorflow/python:framework", 29 "//tensorflow/python:platform", 30 ], 31) 32 33tf_custom_op_library( 34 name = "duplicate_op.so", 35 srcs = ["duplicate_op.cc"], 36) 37 38tf_py_test( 39 name = "duplicate_op_test", 40 size = "small", 41 srcs = ["duplicate_op_test.py"], 42 data = [":duplicate_op.so"], 43 tags = [ 44 "no_pip", 45 "notap", 46 ], 47 deps = [ 48 "//tensorflow/python:client_testlib", 49 "//tensorflow/python:framework", 50 "//tensorflow/python:math_ops", 51 "//tensorflow/python:platform", 52 ], 53) 54 55tf_custom_op_library( 56 name = "invalid_op.so", 57 srcs = ["invalid_op.cc"], 58) 59 60tf_py_test( 61 name = "invalid_op_test", 62 size = "small", 63 srcs = ["invalid_op_test.py"], 64 data = [":invalid_op.so"], 65 tags = [ 66 "no_pip", 67 "notap", 68 ], 69 deps = [ 70 "//tensorflow/python:client_testlib", 71 "//tensorflow/python:errors", 72 "//tensorflow/python:framework", 73 "//tensorflow/python:platform", 74 ], 75) 76