[mono] [tests] Set error for mono_fullaot runtime tests when no suitable tests are found #96902
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Report MSBuild error when compiling selected runtime tests with
mono_fullaotand no suitable tests are found.Motivation
This can happen when locally building selected tests that are disabled in
issues.targets. This causes:TestExclusionscontain the selected tests,TestScriptswon't be created.runtime/src/tests/build.proj
Line 112 in 980491d
TestDirsto no exists, leading to enumarating all dlls on the disk (/**/*.dll) inruntime/src/tests/build.proj
Line 127 in 980491d
Previous behavior
Build doesn't get stopped and the following warning is reported:
MSBUILD : warning MSB5029: The value "/**/*.dll" of the "Include" attribute in element <ItemGroup> in file "<RUNTIME_ROOT>runtime/src/tests/build.proj (122,37)" is a wildcard that results in enumerating all files on the drive, which was likely not intended. Check that referenced properties are always defined.New behavior
Build gets canceled and error is reported:
error : No tests found for Mono AOT compilation.