diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-04-24 09:11:15 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-04-24 09:14:24 -0700 |
commit | 38b531ddfb1e2fd0afd765710e4416fd555b98ae (patch) | |
tree | d68b4e4581fba8af790079f180b95350b269d5cc /tensorflow/tools/proto_text | |
parent | 1ce99cfa52b19a40cff8a9ae983a0a7f04eb2bf1 (diff) |
Internal Change
PiperOrigin-RevId: 194096341
Diffstat (limited to 'tensorflow/tools/proto_text')
-rw-r--r-- | tensorflow/tools/proto_text/BUILD | 7 | ||||
-rw-r--r-- | tensorflow/tools/proto_text/gen_proto_text_functions.cc | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/tensorflow/tools/proto_text/BUILD b/tensorflow/tools/proto_text/BUILD index ef7bfdd3c9..31e8fb9120 100644 --- a/tensorflow/tools/proto_text/BUILD +++ b/tensorflow/tools/proto_text/BUILD @@ -75,9 +75,14 @@ tf_proto_library_cc( ) tf_generate_proto_text_sources( - name = "test_proto_text_srcs", + name = "test_proto_text", srcs = ["test.proto"], srcs_relative_dir = "tensorflow/tools/proto_text/", + deps = [ + ":test_proto_cc", + "//tensorflow/core:lib", + "//tensorflow/core:lib_internal", + ], ) tf_cc_test( diff --git a/tensorflow/tools/proto_text/gen_proto_text_functions.cc b/tensorflow/tools/proto_text/gen_proto_text_functions.cc index f0bb59acf8..234afe879b 100644 --- a/tensorflow/tools/proto_text/gen_proto_text_functions.cc +++ b/tensorflow/tools/proto_text/gen_proto_text_functions.cc @@ -130,7 +130,11 @@ int MainImpl(int argc, char** argv) { const string path = output_root + "/" + proto_path_no_suffix + suffix; FILE* f = fopen(path.c_str(), "w"); - if (f == nullptr) return -1; + if (f == nullptr) { + // We don't expect this output to be generated. It was specified in the + // list of sources solely to satisfy a proto import dependency. + continue; + } if (fwrite(data.c_str(), 1, data.size(), f) != data.size()) { fclose(f); return -1; |