#!/bin/sh
#
# test-analyze-check
#
# Author: Tatu Ylonen <ylo@ssh.com>
#
# Copyright (c) 1997 SSH Communications Security, Finland
#                    All rights reserved
#
# Checks whether the "make check" part of automatic testing resulted in
# errors.
#
# This exits with 0 if errors were found, and 1 if no errors were found.
#

if test $# -ne 1; then
  echo 'Usage: test-analyze-check <filename>'
  exit 0
fi

file="$1"

if egrep '^FAIL: ' $file >&2; then
  exit 0
fi

exit 1
