diff options
author | fvogel <fvogelnew1@free.fr> | 2021-05-25 08:10:17 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2021-05-25 08:10:17 (GMT) |
commit | 2415c763010105d2885365a8feacec77a52188f2 (patch) | |
tree | acb0d30742868cd4be74c37839e2d1ef95194002 | |
parent | 492bfc7aae277f2a8cdfcabc1a8f8fe7443500d3 (diff) | |
parent | 1c07c560b97d767fea6eb24d2af8e20df9673f02 (diff) | |
download | tk-2415c763010105d2885365a8feacec77a52188f2.zip tk-2415c763010105d2885365a8feacec77a52188f2.tar.gz tk-2415c763010105d2885365a8feacec77a52188f2.tar.bz2 |
merge mac_workflow branch
-rw-r--r-- | .github/workflows/mac-build.yml | 39 | ||||
-rw-r--r-- | tests/tk.test | 6 |
2 files changed, 30 insertions, 15 deletions
diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index 0bd8cf6..2600858 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 @@ -37,8 +37,17 @@ 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.0 + runs-on: macos-11 strategy: matrix: symbols: @@ -63,15 +72,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 @@ -119,20 +127,29 @@ 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 } 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 || { - echo "::error::Failure during Test" + ( runXvfb :0; make test-classic; exit $? ) | tee out-classic.txt || { + echo "::error::Failure during Test (classic)" + exit 1 + } + ( 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.txt | grep -q "Failed [1-9]" && { - echo "::error::Failure in test results" + cat out-ttk.txt | grep -q "Failed 0" || { + echo "::error::Failure in ttk test results" exit 1 } - name: Carry out trial installation 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 { |