From 9b31eaad09d6bb3fd820f970979e9f4d645c0abc Mon Sep 17 00:00:00 2001 From: Jared Parsons Date: Wed, 3 Feb 2016 22:30:03 -0800 Subject: [PATCH] Harden the test script --- build/scripts/test-determinism.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/build/scripts/test-determinism.ps1 b/build/scripts/test-determinism.ps1 index a09300108f2..ff6cc4a7c36 100644 --- a/build/scripts/test-determinism.ps1 +++ b/build/scripts/test-determinism.ps1 @@ -1,9 +1,8 @@ param ([string]$buildDir = $(throw "Need a directory containing a compiler build to test with")) -# TODO: Use the Roslyn.sln instead of Compilers.sln $rootDir = split-path -parent (split-path -parent $PSScriptRoot) -$debugDir = join-path $rootDir "Binaries\Debug" -$sln = join-path $rootDir "build\Toolset.sln" +$debugDir = resolve-path (join-path $rootDir "Binaries\Debug") +$sln = join-path $rootDir "Compilers.sln" pushd $rootDir @@ -25,19 +24,20 @@ while ($i -lt 3 -and $allGood) { write-host "Testing the binaries" foreach ($dll in gci -re -in Microsoft.CodeAnalysis.*dll,Roslyn.*dll,cs*exe,vb*exe) { - $dllName = split-path -leaf $dll + $dllFullName = $dll.FullName + $dllName = split-path -leaf $dllFullName $dllHash = get-md5 $dll if ($i -eq 0) { write-host "`tRecording $dllName = $dllHash" - $map[$dllName] = $dllHash + $map[$dllFullName] = $dllHash } else { - $oldHash = $map[$dllName] + $oldHash = $map[$dllFullName] if ($oldHash -eq $dllHash) { write-host "`tVerified $dllName" } else { - write-host "`tERROR! $dllName changed" + write-host "`tERROR! $dllName changed ($dllFullName)" $allGood = $false } } -- GitLab