Makefile revision 0
0N/A# Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. 0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A# This code is free software; you can redistribute it and/or modify it 0N/A# under the terms of the GNU General Public License version 2 only, as 0N/A# published by the Free Software Foundation. 0N/A# This code is distributed in the hope that it will be useful, but WITHOUT 0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A# version 2 for more details (a copy is included in the LICENSE file that 0N/A# accompanied this code). 0N/A# You should have received a copy of the GNU General Public License version 0N/A# 2 along with this work; if not, write to the Free Software Foundation, 0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A# CA 95054 USA or visit www.sun.com if you need additional information or 0N/A# have any questions. 0N/A# Makefile to run jtreg 0N/A# Default bundle of all test results (passed or not) 0N/A# Default home for JTREG 0N/A# Default JTREG to run 0N/A# Root of this test area 0N/A# Default JDK to test 0N/A# The test directories to run 0N/A# Files that hold total passed and failed counts (passed==0 is bad) 0N/A# Root of all test results 0N/A# Test results for one test directory 0N/A# Temp files used by this Makefile 0N/A# JTREG options (different for 2.1.6 and 3.2.2_01) 0N/A# Chaeck to make sure these directories exist 0N/A# Run the tests and determine the 'make' command exit status 0N/A# Ultimately we determine the make exit code based on the passed/failed count 0N/A echo "JTREG FAILED"; \
0N/A echo "JTREG PASSED"; \
0N/A# Just make sure these directires exist 0N/A @
if [ ! -d $@ ] ;
then \
0N/A echo "ERROR: Directory $@ does not exist"; \
0N/A# Make sure this file exists 0N/A @
if [ ! -f $@ ] ;
then \
0N/A echo "ERROR: File $@ does not exist"; \
0N/A# Process each test directory one by one, this rule always completes. 0N/A# Note that the use of 'tee' tosses the jtreg process exit status, this 0N/A# is as expected because even if jtreg fails, we need to save the 0N/A# output. So we update the JTREG_PASSED and JTREG_FAILED count files. 0N/A# Note that missing the 'results:' line in the last few lines of output 0N/A# will indicate a failure (or a bump by one of the JTREG_FAILED file. 0N/A# Note that passed: 0 or no passed: indication means a failure. 0N/A# Note that any indication of the word 'failed' indicates failure. 0N/A# Ultimately if the contents of JTREG_FAILED is not 0, we have failed 0N/A# tests, and if the contents of JTREG_PASSED is 0, we consider that a 0N/A @
if [ ! -d $@ ] ;
then \
0N/A echo "ERROR: Directory $@ does not exist"; \
0N/A @
echo "---------------------------------------------------" 0N/A echo "Assume we are using jtreg 3.2.2_01 or newer"; \
0N/A echo "Assume we are using jtreg 2.1.6"; \
0N/A @
echo "---------------------------------------------------" 0N/A @
echo "Extracting passed and failed counts from jtreg output" 0N/A echo "ERROR: No passed indication in results"; \
0N/A echo "ERROR: Passed count appears to be 0"; \
0N/A echo "No indication anything failed"; \
0N/A echo "ERROR: Failed pattern but no failed count in results"; \
0N/A echo "ERROR: Failed count is 0, did something failed or not?"; \
0N/A @
echo "---------------------------------------------------" 0N/A @
echo "---------------------------------------------------"