ConfigCache.ReadHierarchy can not read my DefaultTestsAutomation.ini

Hello!

I added a file which is DefaultTestsAutomation.ini in the Config folder and I try to use `ConfigCache.ReadHierarchy` to get info in it while being in a inherited class from `UnrealTestConfiguration` but it never hits the file.

What parameter should is put in my `ReadHierarchy` function to make it happen?

[Attachment Removed]

Hello, looking at the implementation on 5.6, it doesn’t seem possible to load this file because the filename must partially match the Type, which is limited to the members of ConfigHierarchyType.

Could you please rename the config file to DefaultEngine.ini and place it in a directory that you then pass to ReadHierarchy() as the CustomConfig argument? (or use the “-CustomConfig=” CLI argument).

The location is relative to the project, and you only need to provide the CustomConfig folder name (e.g., “TestsAutomation” for “{PROJECT}/Config/Custom/TestsAutomation/Default{TYPE}.ini”).

[Attachment Removed]

Thanks [mention removed]​ !

Did the implemntation change in 5.7 and 5.8? So I could use my file as is?

Of not I will change the file as you wrote to me

[Attachment Removed]

You’re welcome! The implementation has had minor changes along the way to 5.8 (e.g., a few other places are checked for config files), but you’ll still need to use the pattern that I described earlier.

There haven’t been any changes that would allow you to use your file as-is; however, you could extend the ConfigLayers array to add your own custom ini files if you prefer this approach.

https://github.com/EpicGames/UnrealEngine/blob/5\.6\.1\-release/Engine/Source/Programs/UnrealBuildTool/System/ConfigHierarchy.cs\#L994

[Attachment Removed]