test(check.rb): improve total_physical_memory#800
Open
tueda wants to merge 1 commit intoform-dev:masterfrom
Open
test(check.rb): improve total_physical_memory#800tueda wants to merge 1 commit intoform-dev:masterfrom
tueda wants to merge 1 commit intoform-dev:masterfrom
Conversation
- On Linux, read /proc/meminfo directly instead of using free. - On Windows, replace deprecated wmic with PowerShell.
fb0bf58 to
ca4f88a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I thought the
freecommand was always available on Linux systems, but it turns out that it is not installed by default in Fedora container images. This PR makescheck.rbread/proc/meminfoinstead of usingfree -b.The PR also changes the code for Windows, replacing the use of the deprecated
wmiccommand with Windows PowerShell.wmicis not available by default starting with Windows 11 version 24H2, while PowerShell (version 3.0 or later,powershell.exe) is available by default on Windows 8 / Windows Server 2012 or later.