We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef48e11 commit f65ebbfCopy full SHA for f65ebbf
1 file changed
tests/regression.test
@@ -11,9 +11,17 @@ if {[namespace which -command "::7z"] eq ""} {
11
12
testConstraint 64bit7z [regexp -nocase {\((?:x|arm)64\)} [7z --version]]; # like 7-Zip 24.09 ZS ... (x64)
13
testConstraint freeMem9G [expr {[apply {{} {
14
- if {![catch {exec wmic OS get FreePhysicalMemory} res]} {
15
- if {[regexp {^FreePhysicalMemory\s+(\d+)} $res {} res]} {
16
- return $res
+ if {$::tcl_platform(platform) eq "windows"} {
+ if {![catch {exec wmic OS get FreePhysicalMemory} res]} {
+ if {[regexp {^FreePhysicalMemory\s+(\d+)} $res {} res]} {
17
+ return $res
18
+ }
19
20
+ } else {
21
+ if {![catch {exec cat /proc/meminfo} res]} {
22
+ if {[regexp -line {^MemAvailable:\s*(\d+)\s+kB} $res {} res]} {
23
24
25
}
26
27
return -1
0 commit comments