From 6a94bf652bc54d03924e178c2424dc91065a544a Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 10 Feb 2025 12:55:50 +0000 Subject: cherry-pick [9b5c0dbbc296ad67]: tests/all.tcl: don't overwrite argument -testdir (may be supplied in args too) --- tests/all.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/all.tcl b/tests/all.tcl index 7d86640..715d1bf 100644 --- a/tests/all.tcl +++ b/tests/all.tcl @@ -13,7 +13,7 @@ package require Tcl 8.5 package require tcltest 2.5 namespace import tcltest::* -configure {*}$argv -testdir [file dir [info script]] +configure -testdir [file normalize [file dirname [info script]]] {*}$argv set ErrorOnFailures [info exists env(ERROR_ON_FAILURES)] unset -nocomplain env(ERROR_ON_FAILURES) if {[runAllTests] && $ErrorOnFailures} {exit 1} -- cgit v0.12 From 082cb4aeb2e74428e0b0298f9796dab53f2f28a8 Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 10 Feb 2025 12:57:25 +0000 Subject: tcltest: avoid "couldn't read directory" error if no read permission on some child folder of "-testdir" parameter (GetMatchingDirectories will be invoked recursively, so nested glob would not fail with "permission denied") --- library/tcltest/tcltest.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 7dc75d7..c245394 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -2763,7 +2763,7 @@ proc tcltest::GetMatchingDirectories {rootdir} { foreach pattern [matchDirectories] { foreach path [glob -directory $rootdir -types d -nocomplain -- \ $pattern] { - if {$path ni $skipDirs} { + if {$path ni $skipDirs && [file readable $path]} { set matchDirs [concat $matchDirs [GetMatchingDirectories $path]] if {[file exists [file join $path all.tcl]]} { lappend matchDirs $path -- cgit v0.12