From 1a53cd0c3f7e76dc1fbdc3d5cc57e6b225fc9c03 Mon Sep 17 00:00:00 2001 From: Tig Date: Sun, 7 Jul 2024 17:29:50 -0600 Subject: [PATCH 1/4] More osx tweaks --- .github/workflows/dotnet-core.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 8c49b7f78..c336a4bdd 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -38,21 +38,24 @@ jobs: - name: Build Debug run: dotnet build --configuration Debug --no-restore - - name: Install sed on macOS + - name: Install sed on macOS and update xunit.runner.json if: runner.os == 'macOS' run: | brew install gnu-sed PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - sed --version + sed -i 's/"stopOnFail": false/"stopOnFail": true/g' UnitTests/xunit.runner.json + + - name: Update xunit.runner.json (Windows/Ubuntu) + if: runner.os != 'macOS' + run: | + sed -i 's/"stopOnFail": false/"stopOnFail": true/g' UnitTests/xunit.runner.json # 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)/ - name: Test run: | - PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - sed -i 's/"stopOnFail": false/"stopOnFail": true/g' UnitTests/xunit.runner.json dotnet test --verbosity normal --collect:"XPlat Code Coverage" --settings UnitTests/coverlet.runsettings --diag:logs/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always - + # mv -v UnitTests/TestResults/*/*.* UnitTests/TestResults/ - name: Upload Test Logs @@ -62,7 +65,6 @@ jobs: name: test-logs path: | logs/ - uploads/ UnitTests/TestResults/ # Note: this step is currently not writing to the gist for some reason From 48ad1a90c5681d5801067e6f8dbc2fe44495a67f Mon Sep 17 00:00:00 2001 From: Tig Date: Sun, 7 Jul 2024 17:32:34 -0600 Subject: [PATCH 2/4] Disabled test on macos --- UnitTests/Views/DateFieldTests.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/UnitTests/Views/DateFieldTests.cs b/UnitTests/Views/DateFieldTests.cs index 4dc349cd3..f421d9448 100644 --- a/UnitTests/Views/DateFieldTests.cs +++ b/UnitTests/Views/DateFieldTests.cs @@ -175,6 +175,12 @@ public class DateFieldTests [Fact] public void Using_All_Culture_StandardizeDateFormat () { + // BUGBUG: This is a workaround for the issue with the date separator in macOS. See https://github.com/gui-cs/Terminal.Gui/issues/3592 + if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) + { + return; + } + CultureInfo cultureBackup = CultureInfo.CurrentCulture; DateTime date = DateTime.Parse ("1/1/1971"); @@ -189,11 +195,6 @@ public class DateFieldTests separator = separator.Replace ("\u200f", ""); } - // BUGBUG: This is a workaround for the issue with the date separator in macOS. See https://github.com/gui-cs/Terminal.Gui/issues/3592 - if (RuntimeInformation.IsOSPlatform (OSPlatform.OSX)) - { - separator = " "; - } string format = culture.DateTimeFormat.ShortDatePattern; var df = new DateField (date); From 148bd2ee4feb698cd4d2d5f5d0628f6c1b5b25ab Mon Sep 17 00:00:00 2001 From: Tig Date: Sun, 7 Jul 2024 17:34:57 -0600 Subject: [PATCH 3/4] fixin test logs? --- .github/workflows/dotnet-core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index c336a4bdd..e99126d0d 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -62,7 +62,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: test-logs + name: test-logs-for-blame-debugging path: | logs/ UnitTests/TestResults/ From 242cab0c00b98b2d00e55e7ba394dc2e8da8a722 Mon Sep 17 00:00:00 2001 From: Tig Date: Sun, 7 Jul 2024 17:40:22 -0600 Subject: [PATCH 4/4] Back to just windows until further debugging can be done. --- .github/workflows/dotnet-core.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index e99126d0d..da75b0fd5 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -18,7 +18,8 @@ jobs: # Turn on fail-fast once we have the tests running on all platforms fail-fast: false matrix: - os: [ ubuntu-latest, windows-latest, macos-latest ] + os: [ windows-latest ] + #os: [ ubuntu-latest, windows-latest, macos-latest ] timeout-minutes: 10 steps: @@ -51,7 +52,7 @@ jobs: sed -i 's/"stopOnFail": false/"stopOnFail": true/g' UnitTests/xunit.runner.json # 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)/ + # Without it, the test runner crashes on ubuntu (but not Windows or mac) - name: Test run: | dotnet test --verbosity normal --collect:"XPlat Code Coverage" --settings UnitTests/coverlet.runsettings --diag:logs/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always