commit | a11c57e0e42aed8489f793b3ba5fee0f9ce84dcf | [log] [tgz] |
---|---|---|
author | Yabin Cui <yabinc@google.com> | Wed Dec 06 14:20:07 2017 -0800 |
committer | Yabin Cui <yabinc@google.com> | Wed Dec 06 14:20:07 2017 -0800 |
tree | 5283cdea84da636f5d37fdc6eac59c222b095afa | |
parent | b80b3d532b3cc93010f9a897b43c090214449f2d [diff] [blame] |
base: allow creating tempfile in a custom temporary dir. Bug: http://b/70232908 Test: none. Change-Id: I24b894793f6725186b3582a91db083427e51aa5a
diff --git a/test_utils.cpp b/test_utils.cpp index 1cfa9e6..9d8dfb2 100644 --- a/test_utils.cpp +++ b/test_utils.cpp
@@ -84,6 +84,10 @@ init(GetSystemTempDir()); } +TemporaryFile::TemporaryFile(const std::string& tmp_dir) { + init(tmp_dir); +} + TemporaryFile::~TemporaryFile() { if (fd != -1) { close(fd);