uptimed: add plist_options and update test (#8234)
This commit is contained in:
parent
1e79af7828
commit
60791ea040
1 changed files with 6 additions and 1 deletions
|
@ -28,6 +28,8 @@ class Uptimed < Formula
|
|||
system "make", "install"
|
||||
end
|
||||
|
||||
plist_options :manual => "uptimed"
|
||||
|
||||
def plist; <<-EOS.undent
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
|
@ -54,6 +56,9 @@ class Uptimed < Formula
|
|||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/uprecords"
|
||||
system "#{sbin}/uptimed", "-t", "0"
|
||||
sleep 2
|
||||
output = shell_output("#{bin}/uprecords -s")
|
||||
assert_match /->\s+\d+\s+\d+\w,\s+\d+:\d+:\d+\s+|.*/, output, "Uptime returned is invalid"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue