Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #3930 - Splits tests to Tests/UnitTests, Tests/IntegrationTests, Tests/StressTests #3954

Open
wants to merge 79 commits into
base: v2_develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 75 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
dea28ba
Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_d…
tig Feb 19, 2025
8ad1d56
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Feb 25, 2025
f7d9650
Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_d…
tig Feb 25, 2025
9aaaf1e
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Feb 26, 2025
84b3d2a
Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_d…
tig Feb 27, 2025
ebbcaff
Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_d…
tig Feb 27, 2025
9c3be44
Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_d…
tig Feb 27, 2025
8733d9c
Merge branch 'v2_develop' of github.com:gui-cs/Terminal.Gui into v2_d…
tig Feb 27, 2025
8003218
Tons of API doc updates
tig Feb 27, 2025
cd0b68d
merge
tig Feb 28, 2025
61462ff
local_packages
tig Feb 28, 2025
cc749bc
Merge branch 'v2_develop' of tig:gui-cs/Terminal.Gui into v2_develop
tig Mar 1, 2025
8b98256
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Mar 1, 2025
fd5b52f
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Mar 2, 2025
1919abe
Merge branch 'gui-cs:v2_develop' into v2_develop
tig Mar 2, 2025
b1079e8
Merge branch 'v2_develop' of tig:tig/Terminal.Gui into v2_develop
tig Mar 2, 2025
e6e00b6
Removed stale test
tig Mar 2, 2025
2c44f6a
Merge branch 'v2_develop' into v2-3952_Test_Failures
tig Mar 2, 2025
52fae01
Removed stale tests
tig Mar 2, 2025
7ea0e5b
Fixed Skipped Shadow test 1
tig Mar 2, 2025
1f8195e
Fixed Skipped Shadow test 2
tig Mar 2, 2025
21c280f
Fixed Skipped Shadow test 3
tig Mar 2, 2025
d404b7a
Removed stale test
tig Mar 2, 2025
de6ef4b
Removed stale test2
tig Mar 2, 2025
e027981
Explicit unregister of event handler on Application.Driver!.ClearedCo…
tig Mar 2, 2025
02df2d9
Added Toplevels to dict
tig Mar 2, 2025
11ae169
code cleanup
tig Mar 2, 2025
fa7b805
spelling error
tig Mar 2, 2025
e1d87b0
Removed stale test3
tig Mar 2, 2025
7381deb
Removed stale test4
tig Mar 2, 2025
7404b2e
Removed stale test5
tig Mar 2, 2025
d8cae96
added script
tig Mar 2, 2025
fed9334
tweaked script
tig Mar 2, 2025
3666298
tweaked script
tig Mar 2, 2025
6c7ff25
Created StressTests project; moved some tests
tig Mar 2, 2025
0c22fb0
Created IntegrationTests project; moved some tests
tig Mar 2, 2025
687c685
New yml
tig Mar 2, 2025
70f3d53
Merge branch 'v2-3952_Test_Failures' of tig:tig/Terminal.Gui into v2-…
tig Mar 2, 2025
830b403
made old yml just unit tests
tig Mar 2, 2025
d398b59
Tweaked Button_IsDefault_Raises_Accepted_Correctly
tig Mar 2, 2025
61da02d
tweaked script
tig Mar 2, 2025
d3b76ab
Merge branch 'v2-3952_Test_Failures' of tig:tig/Terminal.Gui into v2-…
tig Mar 2, 2025
545acd3
Merge branch 'v2-3952_Test_Failures' of tig:tig/Terminal.Gui into v2-…
tig Mar 2, 2025
e9adbf7
cleaned up ymls
tig Mar 2, 2025
3c282d6
tweakled up ymls
tig Mar 2, 2025
2ae7d04
stress tests...
tig Mar 2, 2025
3051dc8
Merge branch 'v2-3952_Test_Failures' of tig:tig/Terminal.Gui into v2-…
tig Mar 2, 2025
361e6a2
stress tests on ubuntu only
tig Mar 3, 2025
83fea8e
Fixed WindowsDriver in InvokeLeakTest
tig Mar 3, 2025
2aa8f7c
Merge branch 'v2-3952_Test_Failures' of tig:tig/Terminal.Gui into v2-…
tig Mar 3, 2025
077236d
Fixed WindowsDriver in InvokeLeakTest2
tig Mar 3, 2025
02a4431
Merge branch 'v2-3952_Test_Failures' of tig:tig/Terminal.Gui into v2-…
tig Mar 3, 2025
bd52fad
Added Directory.Packages.props.
tig Mar 3, 2025
5530a6b
Shortened StressTest time
tig Mar 3, 2025
c4b8aff
Removed dupe file.
tig Mar 3, 2025
ca273f8
DemoFiles
tig Mar 3, 2025
662bca9
Moved all tests to ./Tests dir.
tig Mar 3, 2025
1e3a8c1
Fixed release build issue
tig Mar 3, 2025
64664ea
Fixed .sln file
tig Mar 3, 2025
dfba3a4
Fixed .sl* files
tig Mar 3, 2025
82979f9
Fixing ymls
tig Mar 3, 2025
f8b2428
Fixing interation tests
tig Mar 3, 2025
b826c8c
Create link to the file TestHelpers.
BDisp Mar 3, 2025
6a51345
Created Tests/UnitTestsParallelizable.
tig Mar 3, 2025
57b8add
fixing logs
tig Mar 3, 2025
b18084e
fixing logs2
tig Mar 3, 2025
8957f08
fixing logs3
tig Mar 3, 2025
937d61f
don't require stress to pass for PRs
tig Mar 3, 2025
74661e9
Merge branch 'v2-3952_Test_Failures' of tig:tig/Terminal.Gui into v2-…
tig Mar 3, 2025
91d2cfa
Fix a failure?
tig Mar 3, 2025
020fcc1
tweaked script
tig Mar 3, 2025
c236007
Merge branch 'v2-3952_Test_Failures' of tig:tig/Terminal.Gui into v2-…
tig Mar 3, 2025
8863fad
Coudl this be it?
tig Mar 3, 2025
6b0140f
Merge branch 'v2-3952_Test_Failures' of tig:tig/Terminal.Gui into v2-…
tig Mar 3, 2025
d91abb1
Merge pull request #44 from BDisp/v2-3952_Test_Failures-fix
tig Mar 3, 2025
7906509
Merge branch 'v2-3952_Test_Failures' of tig:tig/Terminal.Gui into v2-…
tig Mar 3, 2025
53abff2
Moved tons of tests to parallelizable
tig Mar 4, 2025
084e9ca
Merge branch 'v2-3952_Test_Failures' of tig:tig/Terminal.Gui into v2-…
tig Mar 4, 2025
308f88e
Fixed some stuff
tig Mar 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 0 additions & 119 deletions .github/workflows/dotnet-core.yml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build & Run Integration Tests

on:
push:
branches: [ v2_release, v2_develop ]
paths-ignore:
- '**.md'
pull_request:
branches: [ v2_release, v2_develop ]
paths-ignore:
- '**.md'

jobs:
build_and_test_debug:

runs-on: ${{ matrix.os }}
strategy:
# Turn off fail-fast to let all runners run even if there are errors
fail-fast: true
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]

timeout-minutes: 10
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-quality: 'ga'

- name: Install dependencies
run: |
dotnet restore

- name: Build IntegrationTests
run: dotnet build Tests/IntegrationTests --configuration Debug --no-restore

- name: Set VSTEST_DUMP_PATH
shell: bash
run: echo "{VSTEST_DUMP_PATH}={logs/${{ runner.os }}/}" >> $GITHUB_ENV

- name: Run IntegrationTests
run: |
dotnet test Tests/IntegrationTests --no-build --verbosity normal --diag:logs/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true

# mv -v Tests/IntegrationTests/TestResults/*/*.* TestResults/IntegrationTests/

- name: Upload Test Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: integration-test-logs-${{ runner.os }}
path: |
logs/
TestResults/IntegrationTests/

51 changes: 51 additions & 0 deletions .github/workflows/stress-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Run StressTests (for 15 minutes)

on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight UTC
push:
branches: [ v2_release, v2_develop ]
paths-ignore:
- '**.md'

jobs:
run_stress_tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]

timeout-minutes: 70 # Allow some buffer time beyond the 1-hour test duration
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-quality: 'ga'

- name: Install dependencies
run: dotnet restore

- name: Build StressTests
run: dotnet build Tests/StressTests --configuration Debug --no-restore

- name: Run StressTests for 15 minutes
run: |
end=$((SECONDS+900))
while [ $SECONDS -lt $end ]; do
dotnet test Tests/StressTests --no-build --verbosity normal --diag:logs/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true
done

- name: Upload Test Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: stress-test-logs-${{ runner.os }}
path: |
logs/
TestResults/StressTests

137 changes: 137 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: Build & Run Unit Tests

on:
push:
branches: [ v2_release, v2_develop ]
paths-ignore:
- '**.md'
pull_request:
branches: [ v2_release, v2_develop ]
paths-ignore:
- '**.md'

jobs:
non_parallel_unittests:
runs-on: ${{ matrix.os }}
strategy:
# Turn off fail-fast to let all runners run even if there are errors
fail-fast: true
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]

timeout-minutes: 10
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-quality: 'ga'

- name: Install dependencies
run: |
dotnet restore

- name: Build Solution Debug
run: dotnet build --configuration Debug --no-restore

# Test
# Note: The --blame and VSTEST_DUMP_PATH stuff is needed to diagnose the test runner crashing on ubuntu/mac
# See https://github.com/microsoft/vstest/issues/2952 for why the --blame stuff below is needed.
# Without it, the test runner crashes on ubuntu (but not Windows or mac)

- name: Set VSTEST_DUMP_PATH
shell: bash
run: echo "{VSTEST_DUMP_PATH}={logs/UnitTests/${{ runner.os }}/}" >> $GITHUB_ENV

- name: Run UnitTests
run: |
dotnet test Tests/UnitTests --no-build --verbosity normal --collect:"XPlat Code Coverage" --settings Tests/UnitTests/coverlet.runsettings --diag:logs/UnitTests/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true

# mv -v Tests/UnitTests/TestResults/*/*.* TestResults/UnitTests/

- name: Upload Test Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: non_parallel_unittests-logs-${{ runner.os }}
path: |
logs/UnitTests
TestResults/UnitTests/

parallel_unittests:
runs-on: ${{ matrix.os }}
strategy:
# Turn off fail-fast to let all runners run even if there are errors
fail-fast: true
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]

timeout-minutes: 10
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-quality: 'ga'

- name: Install dependencies
run: |
dotnet restore

- name: Build Solution Debug
run: dotnet build --configuration Debug --no-restore

# Test
# Note: The --blame and VSTEST_DUMP_PATH stuff is needed to diagnose the test runner crashing on ubuntu/mac
# See https://github.com/microsoft/vstest/issues/2952 for why the --blame stuff below is needed.
# Without it, the test runner crashes on ubuntu (but not Windows or mac)

- name: Set VSTEST_DUMP_PATH
shell: bash
run: echo "{VSTEST_DUMP_PATH}={logs/UnitTestsParallelizable/${{ runner.os }}/}" >> $GITHUB_ENV

- name: Run UnitTests
run: |
dotnet test Tests/UnitTestsParallelizable --no-build --verbosity normal --collect:"XPlat Code Coverage" --settings Tests/UnitTestsParallelizable/coverlet.runsettings --diag:logs/UnitTestsParallelizable/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true

# mv -v Tests/UnitTestsParallelizable/TestResults/*/*.* TestResults/UnitTestsParallelizable/

- name: Upload Test Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: parallel_unittests-logs-${{ runner.os }}
path: |
logs/UnitTestsParallelizable/
TestResults/UnitTestsParallelizable/


build_release:
# Ensure that RELEASE builds are not broken
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-quality: 'ga'

- name: Build Release Terminal.Gui
run: dotnet build Terminal.Gui/Terminal.Gui.csproj --configuration Release

- name: Pack Release Terminal.Gui
run: dotnet pack Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ./local_packages

- name: Build Release Solution
run: dotnet build --configuration Release
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,5 @@ demo.*
*.dotCover

logs/

log.*
4 changes: 1 addition & 3 deletions Benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Terminal.Gui.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
<PackageReference Include="BenchmarkDotNet" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading
Loading