#!/bin/sh
set -euC

OUT=`power-usage-report`

check_log() {
    if ! echo "$OUT" | grep -q "$1"; then
        echo "$1 not found in log:" >&2
        echo "===================" >&2
        cat $LOG >&2
        echo "===================" >&2
        exit 1
    fi
}

# this is just a simple smoketest, but guards against bugs like LP#1265142
check_log "== Wakeups =="
