Avoid using hardcoded path in benchmark_test

/tmp does not exist on windows.

PiperOrigin-RevId: 295988695
Change-Id: Ie45e6311df617462f4ba10354fabbeaf2eb05127
This commit is contained in:
Gunhan Gulsoy 2020-02-19 09:38:55 -08:00 committed by TensorFlower Gardener
parent df36e873c5
commit 1dfd8dc2c4

View File

@ -27,7 +27,7 @@ from tensorflow.python.platform import test
class BenchmarkTest(test.TestCase, benchmark.TensorFlowBenchmark):
def testReportBenchmark(self):
output_dir = '/tmp/'
output_dir = self.get_temp_dir() + os.path.sep
os.environ['TEST_REPORT_FILE_PREFIX'] = output_dir
proto_file_path = os.path.join(output_dir,
'BenchmarkTest.testReportBenchmark')
@ -80,4 +80,3 @@ class BenchmarkTest(test.TestCase, benchmark.TensorFlowBenchmark):
if __name__ == '__main__':
test.main()