summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2021-05-25 08:26:02 (GMT)
committerfvogel <fvogelnew1@free.fr>2021-05-25 08:26:02 (GMT)
commit3550518c9e40db2bab4ceb69a0ce11ed71adae65 (patch)
tree21d3dfa2528dd07657f385da747b6b20b537a62e
parent3502578a9c66406f117d2c11b1491c7dec38ec50 (diff)
downloadtk-3550518c9e40db2bab4ceb69a0ce11ed71adae65.zip
tk-3550518c9e40db2bab4ceb69a0ce11ed71adae65.tar.gz
tk-3550518c9e40db2bab4ceb69a0ce11ed71adae65.tar.bz2
Cherrypick [9d22c7e3] and adapt it to core-8-5-branch.
-rw-r--r--.github/workflows/mac-build.yml24
-rw-r--r--tests/tk.test6
2 files changed, 18 insertions, 12 deletions
diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml
index 07a7431..0fc1d04 100644
--- a/.github/workflows/mac-build.yml
+++ b/.github/workflows/mac-build.yml
@@ -29,9 +29,8 @@ jobs:
- name: Add Tcl
run: |
brew install tcl-tk
- - name: Add X11
- if: ${{ env.USE_XVFB }}
- # This involves black magic
+ - name: Add X11 (if required)
+ if: ${{ env.USE_XVFB == 'true' }}
run: |
brew install --cask xquartz
sudo /opt/X11/libexec/privileged_startx || true
@@ -59,20 +58,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
}
- 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
}
env:
diff --git a/tests/tk.test b/tests/tk.test
index 8f34f06..2377d1b 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 failsOnQuarz [expr {![info exists ::env(MAC_CI)]}]
-
test tk-1.1 {tk command: general} -body {
tk
} -returnCodes error -result {wrong # args: should be "tk option ?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 error -result {wrong # args: should be "tk inactive ?-displayof window? ?reset?"}
-test tk-6.5 {tk inactive} -constraints failsOnQuarz -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 {