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 - - - # ################################################################################# #