#!/bin/sh
set -e

pip install mozmill
export PATH=$PATH:/usr/local/bin
cd tests
rm -f output.log
xvfb-run ./run.sh | tee ./output.log
if grep "INFO Failed: [1-9].*" ./output.log > /dev/null; then
  rm -f output.log
  exit 1
else
  rm -f output.log
  exit 0
fi
