From 95a05e81af7c2879e215eea0abcbd62309754a9d Mon Sep 17 00:00:00 2001 From: Oscar Vestlie Date: Thu, 6 Jul 2023 15:24:31 -0700 Subject: [PATCH] Add subfolder for drain_file_test (#792) b/288297909 --- starboard/loader_app/drain_file_test.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/starboard/loader_app/drain_file_test.cc b/starboard/loader_app/drain_file_test.cc index bf0863c4e3c9e..a1e0f07ca55bb 100644 --- a/starboard/loader_app/drain_file_test.cc +++ b/starboard/loader_app/drain_file_test.cc @@ -19,6 +19,7 @@ #include "starboard/common/file.h" #include "starboard/common/log.h" +#include "starboard/common/string.h" #include "starboard/configuration_constants.h" #include "starboard/directory.h" #include "starboard/loader_app/drain_file_helper.h" @@ -40,6 +41,11 @@ class DrainFileTest : public ::testing::Test { temp_dir_.resize(kSbFileMaxPath); ASSERT_TRUE(SbSystemGetPath(kSbSystemPathTempDirectory, temp_dir_.data(), temp_dir_.size())); + + // Use dedicated dir for testing to avoid meddling with other files. + starboard::strlcat(temp_dir_.data(), kSbFileSepString, kSbFileMaxPath); + starboard::strlcat(temp_dir_.data(), "df", kSbFileMaxPath); + ASSERT_TRUE(SbDirectoryCreate(temp_dir_.data())); } void TearDown() override { DrainFileClearForApp(GetTempDir(), ""); }