Skip to content

Commit

Permalink
Add subfolder for drain_file_test (#792)
Browse files Browse the repository at this point in the history
b/288297909
  • Loading branch information
oxve authored Jul 6, 2023
1 parent b329999 commit 95a05e8
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 95a05e8

Please sign in to comment.