Skip to content

Commit 4d5e9b1

Browse files
committed
add the hash of the path to the test name
This is to support multiple scenes with the same names if they are in different folders
1 parent be2a342 commit 4d5e9b1

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Regression_test/RegressionSceneList.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@ void RegressionSceneList<T>::collectScenesFromList(const std::string& scenesDir,
219219

220220

221221

222-
std::string scene = listDir + "/" + sceneFromList;
222+
std::string scene = FileSystem::append(listDir, sceneFromList);
223223
std::string sceneFromScenesDir(scene);
224224
sceneFromScenesDir.erase( sceneFromScenesDir.find(scenesDir+(scenesDir[scenesDir.size()-1] == '/' ? "" : "/")), scenesDir.size()+1 );
225-
std::string reference = fullPathReferenceDir + "/" + sceneFromList + ".reference";
225+
std::string reference = FileSystem::append(fullPathReferenceDir, sceneFromList) + ".reference";
226226

227227
#ifdef WIN32
228228
// Minimize absolute scene path to avoid MAX_PATH problem

Regression_test/Regression_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ std::string BaseRegression_test::getTestName(const ::testing::TestParamInfo<Regr
2929
std::string name = path.substr(pos);
3030
std::replace(name.begin(), name.end(), '.', '_');
3131

32-
return name;
32+
const auto hash = std::hash<std::string>{}(path);
33+
34+
return name + "_" + std::to_string(hash);
3335
}
3436

3537

0 commit comments

Comments
 (0)