diff options
author | Robert Rothenberg <rrwo@cpan.org> | 2020-03-29 13:04:21 +0100 |
---|---|---|
committer | Robert Rothenberg <rrwo@cpan.org> | 2020-03-29 13:04:21 +0100 |
commit | 2779b02f8f38a442b729426e7e32d5368b350d45 (patch) | |
tree | 68d25f7fb0bf2e9e78e281ce1ba95af9d849a79c | |
parent | 15d470de6f0b00043dc070a76627e817e3aad1f3 (diff) |
Skip uptime test if uptime cannot be found
-rw-r--r-- | Changes | 2 | ||||
-rw-r--r-- | t/12-uptime.t | 4 |
2 files changed, 6 insertions, 0 deletions
@@ -10,6 +10,8 @@ Revision history for Perl extension {{$dist->name}}: [Tests] - Fixed test when skipping getloadavg test. + - Skip uptime test if uptime cannot be found. + 0.22 2020-03-27 12:51:39+00:00 Europe/London (TRIAL RELEASE) [Enhancements] - Split getloadavg, proc_loadavg and uptime into separate functions. diff --git a/t/12-uptime.t b/t/12-uptime.t index 74eca75..ba1faca 100644 --- a/t/12-uptime.t +++ b/t/12-uptime.t @@ -1,5 +1,9 @@ use Test::Most; +use File::Which qw/ which /; + +plan skip_all => "no uptime found" + unless which("uptime"); use_ok 'Sys::CpuLoad', 'uptime'; |