Skip to content

Commit

Permalink
Cherry pick PR #792: Add subfolder for drain_file_test (#1244)
Browse files Browse the repository at this point in the history
Refer to the original PR: #792

b/288297909

Co-authored-by: Oscar Vestlie <[email protected]>
  • Loading branch information
cobalt-github-releaser-bot and oxve authored Nov 29, 2023
1 parent 9ebdbc6 commit 99b8c78
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions starboard/loader_app/drain_file_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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(), ""); }
Expand Down

0 comments on commit 99b8c78

Please sign in to comment.