@@ -18,79 +18,85 @@ if exist "%ProgramFiles%\MSBuild\%VisualStudioVersion%\Bin\MSBuild.exe" set
1818if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe.&& goto :eof
1919
2020set _ngenexe = " %SystemRoot% \Microsoft.NET\Framework\v4.0.30319\ngen.exe"
21- if not exist %_ngenexe% echo Error: Could not find ngen.exe.&& goto :eof
21+ if not exist %_ngenexe% echo Error: Could not find ngen.exe.&& goto :failure
2222
2323.\.nuget\NuGet.exe restore packages.config -PackagesDirectory packages
24- @ if ERRORLEVEL1 echo Error: Nuget restore failed&& goto :eof
24+ @ if ERRORLEVEL1 echo Error: Nuget restore failed&& goto :failure
2525
2626:: Build
2727%_msbuildexe% src\fsharp-proto-build.proj
28- @ if ERRORLEVEL1 echo Error: compiler proto build failed&& goto :eof
28+ @ if ERRORLEVEL1 echo Error: compiler proto build failed&& goto :failure
2929
3030%_ngenexe% install Proto\net40\bin\fsc-proto.exe
31- @ if ERRORLEVEL1 echo Error: NGen of proto failed&& goto :eof
31+ @ if ERRORLEVEL1 echo Error: NGen of proto failed&& goto :failure
3232
3333%_msbuildexe% src/fsharp-library-build.proj /p:Configuration=Release
34- @ if ERRORLEVEL1 echo Error: libraryrelease build failed&& goto :eof
34+ @ if ERRORLEVEL1 echo Error: library build failed&& goto :failure
3535
3636%_msbuildexe% src/fsharp-compiler-build.proj /p:Configuration=Release
37- @ if ERRORLEVEL1 echo Error: compiler build failed&& goto :eof
37+ @ if ERRORLEVEL1 echo Error: compiler build failed&& goto :failure
3838
3939%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
40- @ if ERRORLEVEL1 echo Error: library portable47 build failed&& goto :eof
40+ @ if ERRORLEVEL1 echo Error: library portable47 build failed&& goto :failure
4141
4242%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
43- @ if ERRORLEVEL1 echo Error: library portable7 build failed&& goto :eof
43+ @ if ERRORLEVEL1 echo Error: library portable7 build failed&& goto :failure
4444
4545%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
46- @ if ERRORLEVEL1 echo Error: library portable78 build failed&& goto :eof
46+ @ if ERRORLEVEL1 echo Error: library portable78 build failed&& goto :failure
4747
4848%_msbuildexe% src/fsharp-library-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
49- @ if ERRORLEVEL1 echo Error: library portable259 build failed&& goto :eof
49+ @ if ERRORLEVEL1 echo Error: library portable259 build failed&& goto :failure
50+
5051%_msbuildexe% src/fsharp-compiler-unittests-build.proj /p:Configuration=Release
51- @ if ERRORLEVEL1 echo Error: compiler unittests build failed&& goto :eof
52+ @ if ERRORLEVEL1 echo Error: compiler unittests build failed&& goto :failure
5253
5354%_msbuildexe% src/fsharp-library-unittests-build.proj /p:Configuration=Release
54- @ if ERRORLEVEL1 echo Error: library unittests build failed&& goto :eof
55+ @ if ERRORLEVEL1 echo Error: library unittests build failed&& goto :failure
5556
5657%_msbuildexe% src/fsharp-library-unittests-build.proj /p:TargetFramework=portable47 /p:Configuration=Release
57- @ if ERRORLEVEL1 echo Error: library unittests build failed portable47&& goto :eof
58+ @ if ERRORLEVEL1 echo Error: library unittests build failed portable47&& goto :failure
5859
5960%_msbuildexe% src/fsharp-library-unittests-build.proj /p:TargetFramework=portable7 /p:Configuration=Release
60- @ if ERRORLEVEL1 echo Error: library unittests build failed portable7&& goto :eof
61+ @ if ERRORLEVEL1 echo Error: library unittests build failed portable7&& goto :failure
6162
6263%_msbuildexe% src/fsharp-library-unittests-build.proj /p:TargetFramework=portable78 /p:Configuration=Release
63- @ if ERRORLEVEL1 echo Error: library unittests build failed portable78&& goto :eof
64+ @ if ERRORLEVEL1 echo Error: library unittests build failed portable78&& goto :failure
6465
6566%_msbuildexe% src/fsharp-library-unittests-build.proj /p:TargetFramework=portable259 /p:Configuration=Release
66- @ if ERRORLEVEL1 echo Error: library unittests build failed portable259&& goto :eof
67-
67+ @ if ERRORLEVEL1 echo Error: library unittests build failed portable259&& goto :failure
6868
69- %_msbuildexe% vsintegration\fsharp-vsintegration-build.proj /p:TargetFramework=net40 /p: Configuration=Release
70- @ if ERRORLEVEL1 echo Error: VS integration build failed&& goto :eof
69+ %_msbuildexe% vsintegration\fsharp-vsintegration-build.proj /p:Configuration=Release
70+ @ if ERRORLEVEL1 echo Error: VS integration build failed&& goto :failure
7171
72- %_msbuildexe% vsintegration\fsharp-vsintegration-unittests-build.proj /p:TargetFramework=net40 /p: Configuration=Release
73- @ if ERRORLEVEL1 echo Error: VS integration unit tests build failed&& goto :eof
72+ %_msbuildexe% vsintegration\fsharp-vsintegration-unittests-build.proj /p:Configuration=Release
73+ @ if ERRORLEVEL1 echo Error: VS integration unit tests build failed&& goto :failure
7474
7575@ echo on
7676call src\update.cmd release -ngen
7777
7878@ echo on
7979call tests\BuildTestTools.cmd release
80- @ if ERRORLEVEL1 echo Error: 'tests\BuildTestTools.cmd release' failed&& goto :eof
80+ @ if ERRORLEVEL1 echo Error: 'tests\BuildTestTools.cmd release' failed&& goto :failure
8181
8282@ echo on
8383pushd tests
8484
8585call RunTests.cmd release fsharp Smoke
86- @ if ERRORLEVEL1 echo Error: 'RunTests.cmd release fsharp Smoke' failed&& goto :eof
86+ @ if ERRORLEVEL1 type testresults\fsharp_failures.log && echo Error: 'RunTests.cmd release fsharp Smoke' failed&& goto :failure
8787
8888call RunTests.cmd release fsharpqa Smoke
89- @ if ERRORLEVEL1 echo Error: 'RunTests.cmd release fsharpqa Smoke' failed&& goto :eof
89+ @ if ERRORLEVEL1 type testresults\fsharpqa_failures.log && echo Error: 'RunTests.cmd release fsharpqa Smoke' failed&& goto :failure
9090
9191call RunTests.cmd release compilerunit
92- @ if ERRORLEVEL1 echo Error: 'RunTests.cmd release compilerunit' failed&& goto :eof
92+ @ if ERRORLEVEL1 echo Error: 'RunTests.cmd release compilerunit' failed&& goto :failure
93+
9394call RunTests.cmd release coreunit
94- @ if ERRORLEVEL1 echo Error: 'RunTests.cmd release coreunit' failed&& goto :eof
95+ @ if ERRORLEVEL1 echo Error: 'RunTests.cmd release coreunit' failed&& goto :failure
9596
9697popd
98+
99+ goto :eof
100+
101+ :failure
102+ exit /b1