view test/sun/tools/jstatd/jpsOutput1.awk @ 5808:5ca450af2a9e

6963102: Testcase failures sun/tools/jstatd/jstatdExternalRegistry.sh and sun/tools/jstatd/jstatdDefaults.sh Summary: Make tests more resilient by allowing for more error messages from jps Reviewed-by: alanb, rbackman, dsamersoff
author sla
date Wed, 05 Sep 2012 14:42:44 +0200
parents 2dc35f14bf17
children
line wrap: on
line source
#
BEGIN	{
	    totallines=0; matched=0
	}

/^[0-9]+ [a-z|A-Z][a-z|A-Z|0-9|\$|\.]*$/	{
	    matched++;
	}

/^[0-9]+ -- .*$/	{
	    matched++;
	}

/^[0-9]+ $/	{
	    matched++;
	}

	{ totallines++; print $0 }

END	{
	    if ((totallines > 0) && (matched == totallines)) {
	        exit 0
	    }
	    else {
	        exit 1
	    }
	}