diff options
author | Evan Martin <martine@danga.com> | 2012-01-06 19:34:10 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2012-01-06 19:34:10 (GMT) |
commit | 36660e473b7f38317a38cc5a297ba18166191cf5 (patch) | |
tree | 063a8bc98ce298b911a81193ee2999ed2be03d9d /src/test.h | |
parent | c633f316d74375b49808a0e98511ff224d519746 (diff) | |
download | Ninja-36660e473b7f38317a38cc5a297ba18166191cf5.zip Ninja-36660e473b7f38317a38cc5a297ba18166191cf5.tar.gz Ninja-36660e473b7f38317a38cc5a297ba18166191cf5.tar.bz2 |
migrate tempdir code to test.cc
Diffstat (limited to 'src/test.h')
-rw-r--r-- | src/test.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -61,4 +61,17 @@ struct VirtualFileSystem : public DiskInterface { set<string> files_removed_; }; +struct ScopedTempDir { + /// Create a temporary directory and chdir into it. + void CreateAndEnter(const string& name); + + /// Clean up the temporary directory. + void Cleanup(); + + /// The temp directory containing our dir. + string start_dir_; + /// The subdirectory name for our dir, or empty if it hasn't been set up. + string temp_dir_name_; +}; + #endif // NINJA_TEST_H_ |