Don't try to run tests from SIL.LCModel.Utils.Tests#420
Don't try to run tests from SIL.LCModel.Utils.Tests#420jasonleenaylor merged 2 commits intodevelopfrom
Conversation
Test Results554 tests - 327 554 ✅ - 213 3m 25s ⏱️ -1s Results for commit f8b20bb. ± Comparison against base commit 2dcbbb7. This pull request removes 881 and adds 554 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
58e9bee to
7089a2f
Compare
* Exclude the SIL.LCModel.Utils.Tests.dll since that is a utility dll that has tests in it
7089a2f to
ee0c11c
Compare
hahn-kev
left a comment
There was a problem hiding this comment.
looks good to me, I left a suggestion, but I'm not super sure if it'll work so feel free to discard it. I tried it and got an error I didn't really understand, but I'm not sure if that's just my environment.
| OutputXmlFile="$(RootDir)/output/$(Configuration)/$(TargetFramework)/TestResults.xml" | ||
| TeamCity="$(TeamCity)"/> | ||
| <!-- Loop over each TestAssembly and execute dotnet test --> | ||
| <Exec Command="dotnet test --no-build --verbosity detailed --logger "trx;LogFileName=%(TestAssemblies.Filename)TestResults.trx" --filter "TestCategory!=$(ExtraExcludeCategories)" "%(TestAssemblies.FullPath)"" |
There was a problem hiding this comment.
escaping stuff sucks, could you do this instead?
| <Exec Command="dotnet test --no-build --verbosity detailed --logger "trx;LogFileName=%(TestAssemblies.Filename)TestResults.trx" --filter "TestCategory!=$(ExtraExcludeCategories)" "%(TestAssemblies.FullPath)"" | |
| <PropertyGroup> | |
| <_RunTestsCommand>dotnet test --no-build --verbosity detailed --logger "trx;LogFileName=%(TestAssemblies.Filename)TestResults.trx" --filter "TestCategory!=$(ExtraExcludeCategories)" "%(TestAssemblies.FullPath)"</_RunTestsCommand> | |
| </PropertyGroup> | |
| <!-- Loop over each TestAssembly and execute dotnet test --> | |
| <Exec Command="$(_RunTestsCommand)" |
I'm not too familiar with msbuild so I'm not sure if that would work but it would be much more maintinable
There was a problem hiding this comment.
Yeah, escaping stuff isn't my favorite, but in this case I think it is necessary.
Your suggestion wouldn't work because it would defeat the batching. Actually, the error you got is probably because the metadata expansion isn't valid in a PropertyGroup.
https://learn.microsoft.com/en-us/visualstudio/msbuild/item-metadata-in-task-batching?view=vs-2022
This change is