Skip CLOCK_UPTIME_RAW_APPROX since it seems less precise than advertised on macOS
* See https://travis-ci.org/ruby/ruby/jobs/525595997
This commit is contained in:
parent
392d84b490
commit
d906dd87b0
@ -27,7 +27,7 @@ describe "Process.clock_getres" do
|
|||||||
# The clock should not be less accurate than reported (times should
|
# The clock should not be less accurate than reported (times should
|
||||||
# not all be a multiple of the next precision up, assuming precisions
|
# not all be a multiple of the next precision up, assuming precisions
|
||||||
# are multiples of ten.)
|
# are multiples of ten.)
|
||||||
times.select { |t| t % (reported * 10) == 0 }.size.should_not == times.size
|
times.select { |t| t % (reported * 10) == 0 }.size.should_not == times.size
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -26,6 +26,13 @@ module ProcessSpecs
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# These clocks in practice on macOS seem to be less precise than advertised by clock_getres
|
||||||
|
platform_is :darwin do
|
||||||
|
clocks = clocks.reject { |clock, value|
|
||||||
|
[:CLOCK_UPTIME_RAW_APPROX].include?(clock)
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
# These clocks in practice on ARM on Linux do not seem to match their reported resolution.
|
# These clocks in practice on ARM on Linux do not seem to match their reported resolution.
|
||||||
platform_is :armv7l, :aarch64 do
|
platform_is :armv7l, :aarch64 do
|
||||||
clocks = clocks.reject { |clock, value|
|
clocks = clocks.reject { |clock, value|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user