1#!/bin/bash
2
3# Go through all hosts known to the database for cautotest or
4# cautotest-cq.  Find all hosts with a corresponding servo host.
5# Run servo-stat for each of those hosts.
6#
7# Output from servo-stat goes to stdout.  Starting and ending
8# timestamps are recorded on stderr.
9
10# readlink -f $0, in case $0 is a symlink from somewhere else
11cd $(dirname $(readlink -f $0))
12
13date >&2
14../cli/atest host list -w cautotest | awk '
15        $0 !~ /^Host / &&
16          $0 !~ /board:(parrot|butterfly)/ {print $1}
17    ' | sort | ./haveservo | xargs -l1 ./servo-stat
18date >&2
19