Skip to content

Commit

Permalink
Create dummy git repo for e2e test for proper hashing
Browse files Browse the repository at this point in the history
  • Loading branch information
dfederm committed Jan 9, 2024
1 parent d6fbeb9 commit cd9a90a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/TestProject/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
nuget_packages
MSBuildCache
MSBuildCacheLogs*
MSBuildCacheLogs*
obj/
bin/
10 changes: 10 additions & 0 deletions tests/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,16 @@ $ProjectDir = Join-Path $TestRoot "src"
Remove-Item -Path $TestRoot -Recurse -Force -ErrorAction SilentlyContinue
Copy-Item -Path (Join-Path $PSScriptRoot "TestProject") -Destination $ProjectDir -Recurse

# Create a new git repo with an initial commit so hashing works properly
Write-Host "Creating Git repo in $ProjectDir"
Push-Location $ProjectDir
& git init
& git config user.email "$Env:UserName@microsoft.com"
& git config user.name "$Env:UserName"
& git add .
& git commit -m "Dummy"
Pop-Location

Run-Test `
-TestName "ColdCache" `
-ExpectedCacheHits 0 `
Expand Down

0 comments on commit cd9a90a

Please sign in to comment.