Make use of ::testing::TempDir() to access a tmp dir.

PiperOrigin-RevId: 275117892
Change-Id: I99a2f9489df322a4845eb0c9aab3df2f5581684a
This commit is contained in:
Brian Atkinson 2019-10-16 14:44:56 -07:00 committed by TensorFlower Gardener
parent e3be9bbcad
commit db5816707a
2 changed files with 1 additions and 5 deletions

View File

@ -84,9 +84,6 @@ cc_test(
"//tensorflow/lite:testdata/multi_add.bin",
"//tensorflow/lite:testdata/test_input.csv",
],
tags = [
"no_oss",
],
deps = [
":input_generator",
"@com_google_googletest//:gtest_main",

View File

@ -18,7 +18,6 @@ limitations under the License.
#include <map>
#include <gmock/gmock.h>
#include "testing/base/public/googletest.h"
#include <gtest/gtest.h>
namespace tflite {
@ -47,7 +46,7 @@ TEST(InputGeneratorTest, ReadWriteSimpleFile) {
inputs.push_back(content);
ASSERT_EQ(input_generator.GetInputs(), inputs);
auto output_filename = FLAGS_test_tmpdir + "/out.csv";
auto output_filename = ::testing::TempDir() + "/out.csv";
ASSERT_EQ(input_generator.WriteInputsToFile(output_filename), kTfLiteOk);
std::ifstream in(output_filename);