@@ -353,7 +353,7 @@ function Test-FoldersOnly {
353353
354354 $folderTestOutput = Join-Path $TestResultsDir " incrementalist-affected-folders.txt"
355355 Invoke-IncrementalistTest - TestName " Folders-only check (no cache)" - ProjectPath $ProjectPath - Configuration $Configuration - TestScript {
356- Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -l" , " --no-cache " , " - f" , $folderTestOutput )
356+ Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -l" , " -f" , $folderTestOutput )
357357 }
358358}
359359
@@ -362,58 +362,34 @@ function Test-SolutionCheck {
362362
363363 $solutionTestOutput = Join-Path $TestResultsDir " incrementalist-affected-files.txt"
364364 Invoke-IncrementalistTest - TestName " Solution check (no cache)" - ProjectPath $ProjectPath - Configuration $Configuration - TestScript {
365- Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " --no-cache " , " - f" , $solutionTestOutput )
365+ Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -f" , $solutionTestOutput )
366366 }
367367}
368368
369369function Test-CommandExecution {
370370 param ($ProjectPath , $Configuration )
371371
372372 Invoke-IncrementalistTest - TestName " Command execution (no cache)" - ProjectPath $ProjectPath - Configuration $Configuration - TestScript {
373- Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -r" , " --no-cache " , " -- " , " build" , " -c" , " Release" , " --nologo" )
373+ Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -r" , " --" , " build" , " -c" , " Release" , " --nologo" )
374374 }
375375}
376376
377377function Test-ParallelExecution {
378378 param ($ProjectPath , $Configuration )
379379
380380 Invoke-IncrementalistTest - TestName " Parallel execution (no cache)" - ProjectPath $ProjectPath - Configuration $Configuration - TestScript {
381- Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -r" , " --parallel" , " --no-cache " , " -- " , " build" , " -c" , " Release" , " --nologo" )
381+ Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -r" , " --parallel" , " --" , " build" , " -c" , " Release" , " --nologo" )
382382 }
383383}
384384
385385function Test-ErrorHandling {
386386 param ($ProjectPath , $Configuration )
387387
388388 Invoke-IncrementalistTest - TestName " Error handling (no cache)" - ProjectPath $ProjectPath - Configuration $Configuration - TestScript {
389- Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -r" , " --fail-on-no-projects" , " --no-cache " , " -- " , " invalid-command" )
389+ Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -r" , " --fail-on-no-projects" , " --" , " invalid-command" )
390390 } - ExpectFailure $true
391391}
392392
393- function Test-CacheCreation {
394- param ($ProjectPath , $Configuration , $TestResultsDir )
395-
396- $solutionPath = Join-Path $PSScriptRoot " ..\Incrementalist.sln"
397- Remove-IncrementalistCache - SolutionPath $solutionPath
398-
399- $cacheTestOutput = Join-Path $TestResultsDir " incrementalist-cache-creation.txt"
400- Invoke-IncrementalistTest - TestName " Cache creation" - ProjectPath $ProjectPath - Configuration $Configuration - TestScript {
401- # Run without --no-cache to create the cache
402- Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " --no-cache" , " -f" , $cacheTestOutput )
403- }
404- }
405-
406- function Test-CacheReuse {
407- param ($ProjectPath , $Configuration , $TestResultsDir )
408-
409- $cacheTestOutput = Join-Path $TestResultsDir " incrementalist-cache-reuse.txt"
410- Invoke-IncrementalistTest - TestName " Cache reuse" - ProjectPath $ProjectPath - Configuration $Configuration - TestScript {
411- # Run again without --no-cache to reuse the existing cache
412- Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " --no-cache" , " -f" , $cacheTestOutput )
413- Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -f" , $cacheTestOutput )
414- }
415- }
416-
417393function Test-ComplexCommandArguments {
418394 param ($ProjectPath , $Configuration )
419395
@@ -428,7 +404,6 @@ function Test-ComplexCommandArguments {
428404 $incrementalistArgs = @ (
429405 " -b" , " dev" ,
430406 " -r" ,
431- " --no-cache" ,
432407 " --" , # Separator for dotnet command arguments
433408 " test" ,
434409 " --logger" , " console;verbosity=detailed" ,
@@ -459,7 +434,7 @@ function Test-SimilarDotnetArguments {
459434 }
460435
461436 Invoke-IncrementalistTest - TestName " Similar Incrementalist and dotnet Arguments" - ProjectPath $ProjectPath - Configuration $Configuration - TestScript {
462- Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -c" , " -r" , " --no-cache " )
437+ Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -c" , " -r" )
463438 }
464439
465440 # Cleanup
@@ -477,7 +452,7 @@ function Test-GlobTargeting {
477452 Invoke-IncrementalistTest - TestName " Glob targeting" - ProjectPath $ProjectPath - Configuration $Configuration - TestScript {
478453 # First, run a baseline to check if any changes are detected
479454 Write-Host " Running baseline to check for changes..."
480- $exitCodeBaseline = Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " --no-cache " , " - f" , $baselineOutput )
455+ $exitCodeBaseline = Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -f" , $baselineOutput )
481456 if ($exitCodeBaseline -ne 0 ) { throw " Incrementalist baseline command failed with exit code $exitCodeBaseline " }
482457
483458 $baselineProjects = @ (Get-Content $baselineOutput - ErrorAction SilentlyContinue)
@@ -510,8 +485,8 @@ function Test-GlobTargeting {
510485 }
511486
512487 # Run Incrementalist with target glob
513- # dotnet run --project $ProjectPath -c $Configuration --no-build -- -b dev --target-glob "**/Incrementalist.csproj" --no-cache - f $targetGlobOutput
514- $exitCodeTarget = Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " --target-glob" , " **/Incrementalist.csproj" , " --no-cache " , " - f" , $targetGlobOutput )
488+ # dotnet run --project $ProjectPath -c $Configuration --no-build -- -b dev --target-glob "**/Incrementalist.csproj" -f $targetGlobOutput
489+ $exitCodeTarget = Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " --target-glob" , " **/Incrementalist.csproj" , " -f" , $targetGlobOutput )
515490 if ($exitCodeTarget -ne 0 ) { throw " Incrementalist command failed with exit code $exitCodeTarget " }
516491
517492 # Verification logic
@@ -537,7 +512,7 @@ function Test-GlobSkipping {
537512 Invoke-IncrementalistTest - TestName " Glob skipping" - ProjectPath $ProjectPath - Configuration $Configuration - TestScript {
538513 # 1. Run without skip to get baseline affected projects
539514 Write-Host " Running baseline to determine affected projects..."
540- $exitCodeBaseline = Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " --no-cache " , " - f" , $baselineOutput )
515+ $exitCodeBaseline = Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " -f" , $baselineOutput )
541516 if ($exitCodeBaseline -ne 0 ) { throw " Incrementalist command (baseline) failed with exit code $exitCodeBaseline " }
542517
543518 $baselineProjects = @ (Get-Content $baselineOutput - ErrorAction SilentlyContinue | ForEach-Object { (Resolve-Path $_ ).Path }) | Sort-Object
@@ -574,7 +549,7 @@ function Test-GlobSkipping {
574549
575550 # 2. Run with skip glob
576551 Write-Host " Running with skip glob..."
577- $exitCodeSkip = Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " --skip-glob" , " **/*.Tests.csproj" , " --no-cache " , " - f" , $skipGlobOutput )
552+ $exitCodeSkip = Run- Incrementalist - ProjectPath $ProjectPath - Configuration $Configuration - IncrementalistArgs @ (" -b" , " dev" , " --skip-glob" , " **/*.Tests.csproj" , " -f" , $skipGlobOutput )
578553 if ($exitCodeSkip -ne 0 ) { throw " Incrementalist command (skip glob) failed with exit code $exitCodeSkip " }
579554 $skippedProjects = (Get-Content $skipGlobOutput - ErrorAction SilentlyContinue | ForEach-Object { (Resolve-Path $_ ).Path }) | Sort-Object
580555 Write-Host " Skipped projects count: $ ( $skippedProjects.Count ) "
@@ -728,10 +703,6 @@ foreach ($project in $incrementalistProjects) {
728703 Test-ComplexCommandArguments - ProjectPath $project.FullName - Configuration $Configuration
729704 Test-SimilarDotnetArguments - ProjectPath $project.FullName - Configuration $Configuration
730705
731- # Run cache-specific tests
732- Test-CacheCreation - ProjectPath $project.FullName - Configuration $Configuration - TestResultsDir $testResultsDir
733- Test-CacheReuse - ProjectPath $project.FullName - Configuration $Configuration - TestResultsDir $testResultsDir
734-
735706 # Run glob tests
736707 Test-GlobTargeting - ProjectPath $project.FullName - Configuration $Configuration - TestResultsDir $testResultsDir
737708 Test-GlobSkipping - ProjectPath $project.FullName - Configuration $Configuration - TestResultsDir $testResultsDir
0 commit comments