Skip to content

Commit

Permalink
Document baseline update and allow tests to run in debug mode without…
Browse files Browse the repository at this point in the history
… assert (dotnet#8149)

* document baseline update and allow tests to run in debug mode without assert

* Update DEVGUIDE.md

* Update DEVGUIDE.md

* Update readme.md
  • Loading branch information
dsyme authored and nosami committed Feb 22, 2021
1 parent 3a858cd commit 81e0b8f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/fsharp/IlxGen.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ->
Expand Down
14 changes: 14 additions & 0 deletions tests/fsharpqa/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

2 changes: 1 addition & 1 deletion tests/fsharpqa/testenv/bin/runall.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 81e0b8f

Please sign in to comment.