From 81e0b8f969c35a1f26cbc06d089a60d81b0ee0f3 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Mon, 13 Jan 2020 05:44:08 +0000 Subject: [PATCH] Document baseline update and allow tests to run in debug mode without assert (#8149) * document baseline update and allow tests to run in debug mode without assert * Update DEVGUIDE.md * Update DEVGUIDE.md * Update readme.md --- src/fsharp/IlxGen.fs | 1 - tests/fsharpqa/readme.md | 14 ++++++++++++++ tests/fsharpqa/testenv/bin/runall.pl | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index 18be85e72a3..9534358624d 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -5089,7 +5089,6 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau | _ -> error(InternalError("these matches should never be needed", switchm)) and GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets repeatSP targetInfos sequel caseLabels cases (contf: Zmap<_,_> -> FakeUnit) = - assert(cgbuf.GetCurrentStack() = stackAtTargets) // cgbuf stack should be unchanged over tests. [bug://1750]. match defaultTargetOpt with | Some defaultTarget -> diff --git a/tests/fsharpqa/readme.md b/tests/fsharpqa/readme.md index 88bda09b363..ecdcd63bde5 100644 --- a/tests/fsharpqa/readme.md +++ b/tests/fsharpqa/readme.md @@ -32,3 +32,17 @@ A convenience "fsharpqafiles.csproj" project is located in the fsharp.sln soluti (TODO, provide some guidance about how to define env.lst files) +## Updating baselines in tests + +Some tests use "baseline" files. There is sometimes a way to update these baselines en-masse in your local build, +useful when some change affects many baselines. For example, in the 'fsharpqa' tests the baselines +are updated using scripts or utilities that allow the following environment variable to be set: + +``` +set TEST_UPDATE_BSL=1 +``` + +Updating baselines en-masse should be done very carefully and subject to careful code review. Where possible the +compiler change causing the en-masse update should be isolated and minimized so it is obvious at review time that no other +code generation chagnes will be caused. + diff --git a/tests/fsharpqa/testenv/bin/runall.pl b/tests/fsharpqa/testenv/bin/runall.pl index 045a0076ded..53be793355d 100644 --- a/tests/fsharpqa/testenv/bin/runall.pl +++ b/tests/fsharpqa/testenv/bin/runall.pl @@ -147,7 +147,7 @@ my $FILE_ERROR_EXITVAL = 5; my $OTHER_ERROR_EXITVAL = 9; -my $perl = $Config{perlpath}; +my $perl = $^X; BEGIN { @required_mods = ("Win32\\Process.pm");