Stream in the status to GTEST_SKIP in modular filesystem tests.
This change makes it so that whenever a test is skipped because a precondition fails we see exactly what failed. Thus, tests would be easier to debug, especially on Windows or exotic filesystems. There is a small C++ change in the glue code too: `const std::string& foo = ..` should be `std::string foo = ..` everywhere. There were two places where I didn't do this conversion so I'm fixing this mistake now. PiperOrigin-RevId: 284870348 Change-Id: Id0f94437cb6db9d91176097eb1cc104589847f70
This commit is contained in:
parent
b735c799fd
commit
77b30d97cb
@ -344,8 +344,8 @@ Status ModularFileSystem::CopyFile(const std::string& src,
|
|||||||
if (ops_->copy_file == nullptr) return FileSystem::CopyFile(src, target);
|
if (ops_->copy_file == nullptr) return FileSystem::CopyFile(src, target);
|
||||||
|
|
||||||
UniquePtrTo_TF_Status plugin_status(TF_NewStatus(), TF_DeleteStatus);
|
UniquePtrTo_TF_Status plugin_status(TF_NewStatus(), TF_DeleteStatus);
|
||||||
const std::string& translated_src = TranslateName(src);
|
std::string translated_src = TranslateName(src);
|
||||||
const std::string& translated_target = TranslateName(target);
|
std::string translated_target = TranslateName(target);
|
||||||
ops_->copy_file(filesystem_.get(), translated_src.c_str(),
|
ops_->copy_file(filesystem_.get(), translated_src.c_str(),
|
||||||
translated_target.c_str(), plugin_status.get());
|
translated_target.c_str(), plugin_status.get());
|
||||||
return StatusFromTF_Status(plugin_status.get());
|
return StatusFromTF_Status(plugin_status.get());
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user