From 5ce7069d156df977c21ff82f557a260d8d9cc5a2 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sat, 29 Aug 2015 19:05:18 +0200 Subject: [PATCH] Add script that prints the uptime after waiting for all servers. It waits for the message port of each application to become available using waitfor and then waits for the application to actually reply using hey. This establishes the criterion of the boot process being complete as "all servers (and Tracker & Deskbar) are started and respond to messages". --- src/tests/misc/boot_time_logger.sh | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 src/tests/misc/boot_time_logger.sh diff --git a/src/tests/misc/boot_time_logger.sh b/src/tests/misc/boot_time_logger.sh new file mode 100755 index 0000000000..f1a88d8e76 --- /dev/null +++ b/src/tests/misc/boot_time_logger.sh @@ -0,0 +1,34 @@ +#!/bin/sh + + +# Send a message to and wait for a reply from all servers to determine when +# everything's ready. +SIGNATURES=" + application/x-vnd.haiku-registrar + application/x-vnd.Haiku-mount_server + application/x-vnd.Haiku-powermanagement + application/x-vnd.Haiku-cddb_daemon + application/x-vnd.Haiku-midi_server + application/x-vnd.haiku-net_server + application/x-vnd.Haiku-debug_server + application/x-vnd.Be-PSRV + application/x-vnd.haiku-package_daemon + application/x-vnd.Haiku-notification_server + application/x-vnd.Be-input_server + application/x-vnd.Be.media-server + application/x-vnd.Be.addon-host + application/x-vnd.Be-TRAK + application/x-vnd.Be-TSKB" + +for SIGNATURE in $SIGNATURES +do + waitfor -m $SIGNATURE + hey -s $SIGNATURE get + if [ $? -ne 0 ] + then + echo "Failed to get a reply for $SIGNATURE" + exit 1 + fi +done + +system_time