c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill#!/usr/bin/ksh -p
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill#
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# CDDL HEADER START
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill#
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# The contents of this file are subject to the terms of the
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# Common Development and Distribution License (the "License").
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# You may not use this file except in compliance with the License.
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill#
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# or http://www.opensolaris.org/os/licensing.
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# See the License for the specific language governing permissions
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# and limitations under the License.
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill#
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# When distributing Covered Code, include this CDDL HEADER in each
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# If applicable, add the following below this CDDL HEADER, with the
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# fields enclosed by brackets "[]" replaced with your own identifying
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# information: Portions Copyright [yyyy] [name of copyright owner]
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill#
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# CDDL HEADER END
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill#
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill#
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill# Copyright (c) 2011, Joyent, Inc. All rights reserved.
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill#
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrilllet failure=0
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrillprintf "%-3s %-10s %-31s %s\n" "#" "KIND" "TEST" "DETAILS"
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrillwhile [[ -d failure.$failure ]]; do
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill dir=failure.$failure
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill tst=`cat $dir/README | head -1 | nawk '{ print $2 }'`
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill kind=`basename $(dirname $tst)`
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill name=`basename $tst`
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill cols=$(expr `tput cols` - 47)
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill details=`tail -1 $dir/*.err | cut -c1-$cols`
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill printf "%-3d %-10s %-31s " $failure $kind $name
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill echo $details
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill let failure=failure+1
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrilldone
c090e5dfb10cc96e71e6b0f55bf98c18027b002cBryan Cantrill