From 66663a52d1fa304556274be841b79205b9bd90bd Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 24 May 2021 08:19:21 +0000 Subject: Cherrypick [6b90aa9a]: Fix aqua crash in wm-transient-7.5 --- macosx/tkMacOSXWm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 4b08fc5..25bba72 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -3734,6 +3734,7 @@ WmTransientCmd( if (TkGetWindowFromObj(interp, tkwin, objv[3], &container) != TCL_OK) { return TCL_ERROR; } + RemoveTransient(winPtr); containerPtr = (TkWindow*) container; while (!Tk_TopWinHierarchy(containerPtr)) { /* -- cgit v0.12 From 15a9e8ad2a1bb7ec152f37bfd4f428e44ff6a946 Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 24 May 2021 08:57:38 +0000 Subject: According to GitHub Actions documentation ( https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on ), the correct runner for macOs Big Sur is macos-11, not macos-11.0. Follow the doc, even if it was working with macos-11.0 --- .github/workflows/mac-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 0bd8cf6..f2a11eb 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -4,7 +4,7 @@ env: ERROR_ON_FAILURES: 1 jobs: xcode: - runs-on: macos-11.0 + runs-on: macos-11 defaults: run: shell: bash -- cgit v0.12 From 3ae06d54311aa3f20469aff92103e567be2fb89e Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 24 May 2021 08:58:02 +0000 Subject: Ditto --- .github/workflows/mac-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index f2a11eb..386120f 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -38,7 +38,7 @@ jobs: exit 1 } clang: - runs-on: macos-11.0 + runs-on: macos-11 strategy: matrix: symbols: -- cgit v0.12 From a1e091774dbb0a3221b1f804bc5d1affadac99e1 Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 24 May 2021 10:40:18 +0000 Subject: Only install X11 (Xquartz) when required. Fix the test checking this. --- .github/workflows/mac-build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 386120f..3278e10 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -63,15 +63,14 @@ jobs: ref: core-8-6-branch path: tcl - name: Prepare checked out repositories + env: + SET_DISPLAY: ${{ contains(matrix.options, '--disable-aqua') }} run: | touch ../generic/tkStubInit.c ../doc/man.macros mkdir "$HOME/install dir" echo "USE_XVFB=$SET_DISPLAY" >> $GITHUB_ENV - env: - SET_DISPLAY: ${{ contains(matrix.options, '--disable-aqua') }} - name: Add X11 (if required) - if: ${{ env.USE_XVFB }} - # This involves black magic + if: ${{ env.USE_XVFB == 'true' }} run: | brew install --cask xquartz sudo /opt/X11/libexec/privileged_startx || true @@ -124,7 +123,7 @@ jobs: } else function runXvfb { - : do nothing + echo Xvfb not used, this is a --enable-aqua build } fi ( runXvfb :0; make test-classic test-ttk; exit $? ) | tee out.txt || { -- cgit v0.12 From 94f67ff35e720eb9ff86fe0393b9c3a1f7fa6ffe Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 24 May 2021 15:14:10 +0000 Subject: Revert the logic of grepping in the output file because we need an exit code of 0 for grep. As a consequence we need to grep separately in each (classic and ttk) output file. Finally restore proper killing of xvfb. --- .github/workflows/mac-build.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 3278e10..6c8a546 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -118,6 +118,7 @@ jobs: Xvfb $1 & XVFB_PID=$! echo Launched Xvfb $1 as process $XVFB_PID >&2 + trap "echo killing process $XVFB_PID... >&2; kill $XVFB_PID" 0 export DISPLAY=$1 sleep 2 } @@ -126,12 +127,20 @@ jobs: echo Xvfb not used, this is a --enable-aqua build } fi - ( runXvfb :0; make test-classic test-ttk; exit $? ) | tee out.txt || { - echo "::error::Failure during Test" + ( runXvfb :0; make test-classic; exit $? ) | tee out-classic.txt || { + echo "::error::Failure during Test (classic)" exit 1 } - cat out.txt | grep -q "Failed [1-9]" && { - echo "::error::Failure in test results" + ( runXvfb :0; make test-ttk; exit $? ) | tee out-ttk.txt || { + echo "::error::Failure during Test (ttk)" + exit 1 + } + cat out-classic.txt | grep -q "Failed 0" || { + echo "::error::Failure in classic test results" + exit 1 + } + cat out-ttk.txt | grep -q "Failed 0" || { + echo "::error::Failure in ttk test results" exit 1 } - name: Carry out trial installation -- cgit v0.12 From cb40a9955ce98bafc71ecd2eee6b22478b3c60d5 Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 24 May 2021 16:36:41 +0000 Subject: Be more tolerant about timing in tk-6.5 and remove unneeded constraint. This test really does pass on macOS with XQuartz. It may fail (both with XQuartz or with aqua) because of the slowness of the continuous integration platform on which the tests are performed. --- tests/tk.test | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/tk.test b/tests/tk.test index f1a6b9a..d2e9044 100644 --- a/tests/tk.test +++ b/tests/tk.test @@ -10,8 +10,6 @@ eval tcltest::configure $argv tcltest::loadTestedCommands namespace import -force tcltest::test -testConstraint failsOnXQuarz [expr {$tcl_platform(os) ne "Darwin" || [tk windowingsystem] ne "x11" }] - test tk-1.1 {tk command: general} -body { tk } -returnCodes error -result {wrong # args: should be "tk subcommand ?arg ...?"} @@ -154,12 +152,12 @@ test tk-6.3 {tk inactive wrong argument} -body { test tk-6.4 {tk inactive too many arguments} -body { tk inactive reset foo } -returnCodes 1 -result {wrong # args: should be "tk inactive ?-displayof window? ?reset?"} -test tk-6.5 {tk inactive} -constraints failsOnXQuarz -body { +test tk-6.5 {tk inactive} -body { tk inactive reset update after 100 set i [tk inactive] - expr {$i < 0 || ( $i > 90 && $i < 200 )} + expr {$i < 0 || ( $i > 90 && $i < 300 )} } -result 1 test tk-7.1 {tk inactive in a safe interpreter} -body { -- cgit v0.12 From 1c07c560b97d767fea6eb24d2af8e20df9673f02 Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 24 May 2021 19:10:48 +0000 Subject: Add running of the test suite (deployment and development targets) for the xcode job --- .github/workflows/mac-build.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 6c8a546..2600858 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -37,6 +37,15 @@ jobs: echo "::error::Failure during Build" exit 1 } + - name: Run Tests + run: | + make test | tee out.txt + nmatches=$( grep -c "Failed 0" out.txt ) + if [ $nmatches -lt 4 ] + then + echo "::error::Failure during Test" + exit 1 + fi clang: runs-on: macos-11 strategy: -- cgit v0.12