summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Rothenberg <rrwo@cpan.org>2020-03-29 13:04:21 +0100
committerRobert Rothenberg <rrwo@cpan.org>2020-03-29 13:04:21 +0100
commit2779b02f8f38a442b729426e7e32d5368b350d45 (patch)
tree68d25f7fb0bf2e9e78e281ce1ba95af9d849a79c
parent15d470de6f0b00043dc070a76627e817e3aad1f3 (diff)
Skip uptime test if uptime cannot be found
-rw-r--r--Changes2
-rw-r--r--t/12-uptime.t4
2 files changed, 6 insertions, 0 deletions
diff --git a/Changes b/Changes
index 0a985cb..301a1ef 100644
--- a/Changes
+++ b/Changes
@@ -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';