diff --git a/Tasks/TestWindowsTask.cs b/Tasks/TestWindowsTask.cs index fa46054..d459a6d 100644 --- a/Tasks/TestWindowsTask.cs +++ b/Tasks/TestWindowsTask.cs @@ -30,15 +30,18 @@ public override void Run(BuildContext context) { var vswhere = new VSWhereLatest(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools); var devcmdPath = vswhere.Latest(new VSWhereLatestSettings()).FullPath + @"\Common7\Tools\vsdevcmd.bat"; + CheckDir(context, devcmdPath, context.ArtifactsDir); + } - - // Ensure there are files to test otherwise this will always pass - var files = Directory.GetFiles(context.ArtifactsDir); - if (files is null || files.Length == 0) + private void CheckDir(BuildContext context, string devcmdPath, string dir) + { + foreach (var dirPath in Directory.GetDirectories(dir)) { - throw new Exception("There are no files in the artifacts directory to test"); + CheckDir(context, devcmdPath, dirPath); } + // Ensure there are files to test otherwise this will always pass + var files = Directory.GetFiles(context.ArtifactsDir); foreach (var filePath in files) { context.Information($"Checking: {filePath}");