Fix windows test.
The problem was that LocalTempFilename returns a full path, not just a basename, so we were joining two full paths, which doesn't work on Windows. PiperOrigin-RevId: 324094697 Change-Id: I563f692ba6525097c95fda2a45ee9d565ac9c8a1
This commit is contained in:
parent
56bb1ccfaa
commit
26c01423d9
@ -176,7 +176,6 @@ cc_library(
|
||||
tf_cc_test(
|
||||
name = "journal_test",
|
||||
srcs = ["journal_test.cc"],
|
||||
tags = ["no_windows"], # b/162268597
|
||||
deps = [
|
||||
":common_proto_cc",
|
||||
":journal",
|
||||
|
@ -29,11 +29,11 @@ namespace {
|
||||
using ::testing::HasSubstr;
|
||||
|
||||
bool NewJournalDir(std::string* journal_dir) {
|
||||
std::string filename;
|
||||
if (!Env::Default()->LocalTempFilename(&filename)) {
|
||||
std::string filename = testing::TmpDir();
|
||||
if (!Env::Default()->CreateUniqueFileName(&filename, "journal_dir")) {
|
||||
return false;
|
||||
}
|
||||
*journal_dir = io::JoinPath(testing::TmpDir(), filename);
|
||||
*journal_dir = filename;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user