Skip to content

Conversation

@T-Gro
Copy link
Member

@T-Gro T-Gro commented Jan 11, 2023

FsharpSuite.Tests is the longest taking test suite in the longest CI job.
By making it faster, we can speed up end-to-end time for our builds and therefore reduce contributor pain.

The nature of the older test suite was by copying over test directories, emiting an artificial fsproj, and running it with "dotnet run" command. This naturally involved a lot of process creations and IO operations.

The newer test suite in component tests avoids unnecessary process spawns and therefore has smaller per-test overhead, while still maintaining the ability to run the tests with various command line switches like:
debug+/-
optimize+/-

The test definitions were copy pasted as is.
The test invocations functions have been reimplemented in the in-memory test framework.

In a few cases, the test scripts did have some hardcoded assumptions about it's current directory, available files etc. -> fixing those to make the tests run were the only (necessary) changes done to the test files themselves.

For the tests being ported, this lead to a reduction from ~15 minutes to less than 5.
There is still potential to go faster by reusing FSI environments instead of re-creating, but that made some of the tests depend on each other due to naming clashes and that was not good.
So even if it is slightly slower, each test now has a fresh environment.

image

@T-Gro T-Gro requested a review from a team as a code owner January 31, 2023 17:44
@T-Gro T-Gro merged commit d0dfdb9 into main Feb 13, 2023
@T-Gro T-Gro deleted the fsharp-suite-reduction-diet branch February 13, 2023 09:08
vzarytovskii added a commit that referenced this pull request Feb 13, 2023
@T-Gro T-Gro restored the fsharp-suite-reduction-diet branch February 13, 2023 16:51
T-Gro pushed a commit that referenced this pull request Feb 13, 2023
T-Gro added a commit that referenced this pull request Feb 15, 2023
abonie pushed a commit that referenced this pull request Feb 21, 2023
…west CI job (#14752)

* Revert "Revert "FsharpSuite.tests reduction diet (#14590)" (#14742)"

This reverts commit a8e39b3.

* Fix build

* #load ing shims for scripting tests (especially 'exit') so that they can work in process

* Fixing failing widen tests, but breaking new 'printfn with static literals' feature

* Try to make **both** implicit conversions and non-inline strings in printfn work

* Skip failing test on MacOs

* Disable one more (also nuget-related) test on MacOs
@T-Gro T-Gro deleted the fsharp-suite-reduction-diet branch February 27, 2023 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants