Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions tests/src/ResourceToolsLibraryTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ TEST_F( ResourceToolsTest, FileMd5ChecksumGeneration )

std::filesystem::path testDataPath( testDataPathStr );

std::filesystem::path sourcePath = testDataPath / "resourcesOnBranch" / "introMovie.txt";
std::filesystem::path sourcePath = testDataPath / "ResourcesOnBranch" / "introMovie.txt";

std::string output;

Expand All @@ -56,9 +56,9 @@ TEST_F( ResourceToolsTest, FileMd5ChecksumMatches )

std::filesystem::path testDataPath( testDataPathStr );

std::filesystem::path sourcePath = testDataPath / "resourcesOnBranch" / "introMovie.txt";
std::filesystem::path sourcePath = testDataPath / "ResourcesOnBranch" / "introMovie.txt";

std::filesystem::path sourcePath2 = testDataPath / "resourcesOnBranch" / "videoCardCategories.yaml";
std::filesystem::path sourcePath2 = testDataPath / "ResourcesOnBranch" / "videoCardCategories.yaml";

std::string output;

Expand Down Expand Up @@ -99,7 +99,7 @@ TEST_F( ResourceToolsTest, DownloadFile )
ResourceTools::Downloader downloader;
std::filesystem::path testDataPath( testDataPathStr );

std::filesystem::path sourcePath = testDataPath / "resourcesLocal" / FOLDER_NAME / FILE_NAME;
std::filesystem::path sourcePath = testDataPath / "ResourcesLocal" / FOLDER_NAME / FILE_NAME;
std::string sourcePathString( sourcePath.string() );
std::string url = "file://" + sourcePathString;
std::filesystem::path outputPath = std::filesystem::temp_directory_path() / FOLDER_NAME / FILE_NAME;
Expand Down Expand Up @@ -147,7 +147,7 @@ TEST_F( ResourceToolsTest, DownloadHeader )
ResourceTools::Downloader downloader;
std::filesystem::path testDataPath( testDataPathStr );

std::filesystem::path sourcePath = testDataPath / "resourcesLocal" / FOLDER_NAME / FILE_NAME;
std::filesystem::path sourcePath = testDataPath / "ResourcesLocal" / FOLDER_NAME / FILE_NAME;
std::string sourcePathString( sourcePath.string() );
std::string url = "file://" + sourcePathString;

Expand Down Expand Up @@ -194,7 +194,7 @@ TEST_F( ResourceToolsTest, GZipCompressData )
const char* testDataPathStr = TEST_DATA_BASE_PATH;
ASSERT_TRUE( testDataPathStr );
std::filesystem::path testDataPath( testDataPathStr );
std::filesystem::path sourcePath = testDataPath / "resourcesOnBranch" / "introMovie.txt";
std::filesystem::path sourcePath = testDataPath / "ResourcesOnBranch" / "introMovie.txt";

std::string fileData;
ASSERT_TRUE( ResourceTools::GetLocalFileData( sourcePath, fileData ) );
Expand Down Expand Up @@ -888,8 +888,8 @@ TEST_F( ResourceToolsTest, CountMatchingChunks )
const char* testDataPathStr = TEST_DATA_BASE_PATH;
ASSERT_TRUE( testDataPathStr );
std::filesystem::path testDataPath( testDataPathStr );
std::filesystem::path introMovieFilePath = testDataPath / "Patch" / "previousBuildResources" / "introMoviePrefixed.txt";
std::filesystem::path introMoviePatchedFilePath = testDataPath / "Patch" / "nextBuildResources" / "introMoviePrefixed.txt";
std::filesystem::path introMovieFilePath = testDataPath / "Patch" / "PreviousBuildResources" / "introMoviePrefixed.txt";
std::filesystem::path introMoviePatchedFilePath = testDataPath / "Patch" / "NextBuildResources" / "introMoviePrefixed.txt";

const size_t CHUNK_SIZE{ 500 };
const size_t PREFIX_SIZE{ 308 };
Expand Down Expand Up @@ -998,8 +998,8 @@ TEST_F( ResourceToolsTest, CalculateBinaryOperationMacOS )
// 33279: Binaries, not just executables (No extension, .so, .pyd)
// 33188: Basically everything else
std::filesystem::path testDataPath = TEST_DATA_BASE_PATH;
std::filesystem::path textFilePath = testDataPath / "resourcesOnBranch" / "introMovie.txt";
std::filesystem::path nonexistantFilePath = testDataPath / "resourcesOnBranch" / "thisFileDoesNotExist.txt";
std::filesystem::path textFilePath = testDataPath / "ResourcesOnBranch" / "introMovie.txt";
std::filesystem::path nonexistantFilePath = testDataPath / "ResourcesOnBranch" / "thisFileDoesNotExist.txt";
ASSERT_EQ( 33188, ResourceTools::CalculateBinaryOperation( textFilePath ) );
ASSERT_EQ( 0, ResourceTools::CalculateBinaryOperation( nonexistantFilePath ) );
}
Expand All @@ -1010,8 +1010,8 @@ TEST_F( ResourceToolsTest, CalculateBinaryOperationWindows )
// 33279: Executables (.exe, .bat, .cmd, .com) # See: update_st_mode_from_path Modules/posixmodule.c
// 33206: Basically everything else (.dll, .pyd, .yaml, .txt etc. )
std::filesystem::path testDataPath = TEST_DATA_BASE_PATH;
std::filesystem::path textFilePath = testDataPath / "resourcesOnBranch" / "introMovie.txt";
std::filesystem::path nonexistantFilePath = testDataPath / "resourcesOnBranch" / "thisFileDoesNotExist.txt";
std::filesystem::path textFilePath = testDataPath / "ResourcesOnBranch" / "introMovie.txt";
std::filesystem::path nonexistantFilePath = testDataPath / "ResourcesOnBranch" / "thisFileDoesNotExist.txt";
std::filesystem::path binaryFilePath = std::filesystem::temp_directory_path() / "CarbonResources" / "binary.exe";
std::ofstream binaryFile( binaryFilePath );
binaryFile.close();
Expand All @@ -1028,7 +1028,7 @@ TEST_F( ResourceToolsTest, GzipStreams )
stream.Start();
ResourceTools::FileDataStreamIn fileStreamIn( 50 );
std::filesystem::path testDataPath = TEST_DATA_BASE_PATH;
std::filesystem::path testFile = testDataPath / "resourcesOnBranch" / "introMovie.txt";
std::filesystem::path testFile = testDataPath / "ResourcesOnBranch" / "introMovie.txt";
fileStreamIn.StartRead( testFile );
ResourceTools::Md5ChecksumStream originalMd5Stream;

Expand Down
8 changes: 4 additions & 4 deletions tests/src/ResourcesCliTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ TEST_F( ResourcesCliTest, CreateBundle )
arguments.push_back( "--verbosity-level" );
arguments.push_back( "-1" );

arguments.push_back( GetTestFileAbsolutePath( "Bundle/resfileindexShort.txt" ).string() );
arguments.push_back( GetTestFileAbsolutePath( "Bundle/resFileIndexShort.txt" ).string() );

arguments.push_back( "--resource-source-path" );
arguments.push_back( GetTestFileAbsolutePath( "Bundle/Res" ).string() );
Expand Down Expand Up @@ -645,11 +645,11 @@ TEST_F( ResourcesCliTest, CreatePatch )
arguments.push_back( "--verbosity-level" );
arguments.push_back( "-1" );

std::string previousResourceGroupPath = GetTestFileAbsolutePath( "Patch/resfileindexShort_build_previous.txt" ).string();
std::string previousResourceGroupPath = GetTestFileAbsolutePath( "Patch/resFileIndexShort_build_previous.txt" ).string();

arguments.push_back( previousResourceGroupPath );

std::string nextResourceGroupPath = GetTestFileAbsolutePath( "Patch/resfileindexShort_build_next.txt" ).string();
std::string nextResourceGroupPath = GetTestFileAbsolutePath( "Patch/resFileIndexShort_build_next.txt" ).string();

arguments.push_back( nextResourceGroupPath );

Expand All @@ -670,7 +670,7 @@ TEST_F( ResourcesCliTest, CreatePatch )
arguments.push_back( "PatchOut" );

arguments.push_back( "--patch-destination-base-path" );
arguments.push_back( "Patchout/Patches" );
arguments.push_back( "PatchOut/Patches" );

arguments.push_back( "--patch-destination-type" );
arguments.push_back( "LOCAL_CDN" );
Expand Down
30 changes: 15 additions & 15 deletions tests/src/ResourcesLibraryTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ TEST_F( ResourcesLibraryTest, UnpackRemoteBundleAsLocal )
// Import ResourceGroup
CarbonResources::ResourceGroup resourceGroup;
CarbonResources::ResourceGroupImportFromFileParams importParams;
importParams.filename = GetTestFileAbsolutePath( "Bundle/resfileindexShort.txt" );
importParams.filename = GetTestFileAbsolutePath( "Bundle/resFileIndexShort.txt" );

importParams.callbackSettings.statusCallback = StatusUpdate;

Expand Down Expand Up @@ -479,7 +479,7 @@ TEST_F( ResourcesLibraryTest, CreateBundleWithZeroChunkSize )

CarbonResources::ResourceGroupImportFromFileParams importParams;

importParams.filename = GetTestFileAbsolutePath( "Bundle/resfileindexShort.txt" );
importParams.filename = GetTestFileAbsolutePath( "Bundle/resFileIndexShort.txt" );

importParams.callbackSettings.statusCallback = StatusUpdate;

Expand Down Expand Up @@ -523,7 +523,7 @@ TEST_F( ResourcesLibraryTest, CreateBundleRemoteCDN )

CarbonResources::ResourceGroupImportFromFileParams importParams;

importParams.filename = GetTestFileAbsolutePath( "Bundle/resfileindexShort.txt" );
importParams.filename = GetTestFileAbsolutePath( "Bundle/resFileIndexShort.txt" );

importParams.callbackSettings.statusCallback = StatusUpdate;

Expand Down Expand Up @@ -569,7 +569,7 @@ TEST_F( ResourcesLibraryTest, CreateBundle )

CarbonResources::ResourceGroupImportFromFileParams importParams;

importParams.filename = GetTestFileAbsolutePath( "Bundle/resfileindexShort.txt" );
importParams.filename = GetTestFileAbsolutePath( "Bundle/resFileIndexShort.txt" );

importParams.callbackSettings.statusCallback = StatusUpdate;

Expand Down Expand Up @@ -616,7 +616,7 @@ TEST_F( ResourcesLibraryTest, CreateAndUnpackBundle )

CarbonResources::ResourceGroupImportFromFileParams importParams;

importParams.filename = GetTestFileAbsolutePath( "Bundle/resfileindexShort.txt" );
importParams.filename = GetTestFileAbsolutePath( "Bundle/resFileIndexShort.txt" );

importParams.callbackSettings.statusCallback = StatusUpdate;

Expand Down Expand Up @@ -751,7 +751,7 @@ TEST_F( ResourcesLibraryTest, CreatePatchWhereBuildsHaveNoChanges )

CarbonResources::ResourceGroupImportFromFileParams importParamsPrevious;

importParamsPrevious.filename = GetTestFileAbsolutePath( "Patch/resfileindexShort_build_previous.txt" );
importParamsPrevious.filename = GetTestFileAbsolutePath( "Patch/resFileIndexShort_build_previous.txt" );

importParamsPrevious.callbackSettings.statusCallback = StatusUpdate;

Expand All @@ -764,7 +764,7 @@ TEST_F( ResourcesLibraryTest, CreatePatchWhereBuildsHaveNoChanges )

CarbonResources::ResourceGroupImportFromFileParams importParamsLatest;

importParamsLatest.filename = GetTestFileAbsolutePath( "Patch/resfileindexShort_build_previous.txt" );
importParamsLatest.filename = GetTestFileAbsolutePath( "Patch/resFileIndexShort_build_previous.txt" );

importParamsLatest.callbackSettings.statusCallback = StatusUpdate;

Expand Down Expand Up @@ -817,7 +817,7 @@ TEST_F( ResourcesLibraryTest, CreatePatch )

CarbonResources::ResourceGroupImportFromFileParams importParamsPrevious;

importParamsPrevious.filename = GetTestFileAbsolutePath( "Patch/resfileindexShort_build_previous.txt" );
importParamsPrevious.filename = GetTestFileAbsolutePath( "Patch/resFileIndexShort_build_previous.txt" );

importParamsPrevious.callbackSettings.statusCallback = StatusUpdate;

Expand All @@ -831,7 +831,7 @@ TEST_F( ResourcesLibraryTest, CreatePatch )

CarbonResources::ResourceGroupImportFromFileParams importParamsLatest;

importParamsLatest.filename = GetTestFileAbsolutePath( "Patch/resfileindexShort_build_next.txt" );
importParamsLatest.filename = GetTestFileAbsolutePath( "Patch/resFileIndexShort_build_next.txt" );

importParamsLatest.callbackSettings.statusCallback = StatusUpdate;

Expand Down Expand Up @@ -889,7 +889,7 @@ TEST_F( ResourcesLibraryTest, CreatePatchZeroInputChunkSize )

CarbonResources::ResourceGroupImportFromFileParams importParamsPrevious;

importParamsPrevious.filename = GetTestFileAbsolutePath( "Patch/resfileindexShort_build_previous.txt" );
importParamsPrevious.filename = GetTestFileAbsolutePath( "Patch/resFileIndexShort_build_previous.txt" );

importParamsPrevious.callbackSettings.statusCallback = StatusUpdate;

Expand All @@ -903,7 +903,7 @@ TEST_F( ResourcesLibraryTest, CreatePatchZeroInputChunkSize )

CarbonResources::ResourceGroupImportFromFileParams importParamsLatest;

importParamsLatest.filename = GetTestFileAbsolutePath( "Patch/resfileindexShort_build_next.txt" );
importParamsLatest.filename = GetTestFileAbsolutePath( "Patch/resFileIndexShort_build_next.txt" );

importParamsLatest.callbackSettings.statusCallback = StatusUpdate;

Expand Down Expand Up @@ -991,10 +991,10 @@ TEST_F( ResourcesLibraryTest, ApplyPatchWithChunking )
EXPECT_TRUE( StatusIsValid() );

std::filesystem::path nextIntroMovie = GetTestFileAbsolutePath( "PatchWithInputChunk/NextBuildResources/introMovie.txt" );
EXPECT_TRUE( FilesMatch( nextIntroMovie, patchApplyParams.resourcesToPatchDestinationSettings.basePath / "introMovie.txt" ) );
EXPECT_TRUE( FilesMatch( nextIntroMovie, patchApplyParams.resourcesToPatchDestinationSettings.basePath / "intromovie.txt" ) );
std::filesystem::path nextIntroMoviePrefixed = GetTestFileAbsolutePath( "PatchWithInputChunk/NextBuildResources/introMoviePrefixed.txt" );
EXPECT_TRUE( FilesMatch( nextIntroMoviePrefixed, patchApplyParams.resourcesToPatchDestinationSettings.basePath / "introMoviePrefixed.txt" ) );
std::filesystem::path nextTestResource = GetTestFileAbsolutePath( "PatchWithInputChunk/NextBuildResources/testresource2.txt" );
std::filesystem::path nextTestResource = GetTestFileAbsolutePath( "PatchWithInputChunk/NextBuildResources/testResource2.txt" );
EXPECT_TRUE( FilesMatch( nextTestResource, patchApplyParams.resourcesToPatchDestinationSettings.basePath / "testresource2.txt" ) );
}

Expand All @@ -1005,7 +1005,7 @@ TEST_F( ResourcesLibraryTest, CreatePatchWithChunking )

CarbonResources::ResourceGroupImportFromFileParams importParamsPrevious;

importParamsPrevious.filename = GetTestFileAbsolutePath( "PatchWithInputChunk/resfileindexShort_build_previous.txt" );
importParamsPrevious.filename = GetTestFileAbsolutePath( "PatchWithInputChunk/resFileIndexShort_build_previous.txt" );

importParamsPrevious.callbackSettings.statusCallback = StatusUpdate;

Expand All @@ -1018,7 +1018,7 @@ TEST_F( ResourcesLibraryTest, CreatePatchWithChunking )

CarbonResources::ResourceGroupImportFromFileParams importParamsLatest;

importParamsLatest.filename = GetTestFileAbsolutePath( "PatchWithInputChunk/resfileindexShort_build_next.txt" );
importParamsLatest.filename = GetTestFileAbsolutePath( "PatchWithInputChunk/resFileIndexShort_build_next.txt" );

importParamsLatest.callbackSettings.statusCallback = StatusUpdate;

Expand Down