Avoid using hardcoded path in benchmark_test
/tmp does not exist on windows. PiperOrigin-RevId: 295988695 Change-Id: Ie45e6311df617462f4ba10354fabbeaf2eb05127
This commit is contained in:
parent
df36e873c5
commit
1dfd8dc2c4
@ -27,7 +27,7 @@ from tensorflow.python.platform import test
|
|||||||
class BenchmarkTest(test.TestCase, benchmark.TensorFlowBenchmark):
|
class BenchmarkTest(test.TestCase, benchmark.TensorFlowBenchmark):
|
||||||
|
|
||||||
def testReportBenchmark(self):
|
def testReportBenchmark(self):
|
||||||
output_dir = '/tmp/'
|
output_dir = self.get_temp_dir() + os.path.sep
|
||||||
os.environ['TEST_REPORT_FILE_PREFIX'] = output_dir
|
os.environ['TEST_REPORT_FILE_PREFIX'] = output_dir
|
||||||
proto_file_path = os.path.join(output_dir,
|
proto_file_path = os.path.join(output_dir,
|
||||||
'BenchmarkTest.testReportBenchmark')
|
'BenchmarkTest.testReportBenchmark')
|
||||||
@ -80,4 +80,3 @@ class BenchmarkTest(test.TestCase, benchmark.TensorFlowBenchmark):
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
test.main()
|
test.main()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user