diff options
author | mboelen <michael@cisofy.com> | 2014-09-25 21:00:36 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-09-25 21:00:36 +0400 |
commit | ab71616900cd0abae4b73ce7b11308a76f499c7a (patch) | |
tree | 5b1367c135316d4a20855db1359b40275867a7cf /include/tests_boot_services | |
parent | d6903695438d2e64cb03e1f150e7bc32e5b7795d (diff) |
Added Mac OS uptime test [BOOT-5202]
Diffstat (limited to 'include/tests_boot_services')
-rw-r--r-- | include/tests_boot_services | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/tests_boot_services b/include/tests_boot_services index a86d7a32..d4ea4885 100644 --- a/include/tests_boot_services +++ b/include/tests_boot_services @@ -525,6 +525,15 @@ ReportException "${TEST_NO}:1" "No uptime test available for this operating system (/proc/uptime missing)" fi ;; + MacOS) + if [ ! "${SYSCTLBINARY}" = "" ]; then + FIND=`${SYSCTLBINARY} kern.boottime | awk '{ print $5 }' | sed -e 's/,//'` + else + Display --indent 2 --text "- Checking uptime" --result SKIPPED --color YELLOW + ReportException "${TEST_NO}:3" "No uptime test available for this operating system (sysctl missing)" + fi + ;; + Solaris) if [ ! "${KSTATBINARY}" = "" ]; then FIND=`${KSTATBINARY} -p unix:0:system_misc:snaptime | grep "^unix" | awk '{print $2}' | cut -d "." -f1` @@ -545,13 +554,12 @@ UPTIME_IN_DAYS=`expr ${UPTIME_IN_SECS} / 60 / 60 / 24` logtext "Uptime (in seconds): ${UPTIME_IN_SECS}" logtext "Uptime (in days): ${UPTIME_IN_DAYS}" + report "uptime_in_seconds=${UPTIME_IN_SECS}" + report "uptime_in_days=${UPTIME_IN_DAYS}" else logtext "Result: no uptime information available" fi fi - - - # ################################################################################# # |