Skip to content

Commit

Permalink
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/std/system_spec.cr
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ describe System do

describe "cpu_count" do
it "returns current CPU count" do
shell_cpus = `getconf _NPROCESSORS_ONLN || nproc --all || grep -c '^processor' /proc/cpuinfo || sysctl -n hw.ncpu`.to_i
shell_cpus = `getconf _NPROCESSORS_ONLN 2>/dev/null || nproc --all 2>/dev/null || grep -sc '^processor' /proc/cpuinfo || sysctl -n hw.ncpu 2>/dev/null`.to_i
cpu_count = System.cpu_count
cpu_count.should eq(shell_cpus)
end

0 comments on commit bfd9e6d

Please sign in to comment.