430N/A# The contents of this file are subject to the terms of the 430N/A# Common Development and Distribution License (the "License"). 430N/A# You may not use this file except in compliance with the License. 430N/A# See the License for the specific language governing permissions 430N/A# and limitations under the License. 430N/A# When distributing Covered Code, include this CDDL HEADER in each 430N/A# If applicable, add the following below this CDDL HEADER, with the 430N/A# fields enclosed by brackets "[]" replaced with your own identifying 430N/A# information: Portions Copyright [yyyy] [name of copyright owner] 3158N/A# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. 1715N/A """Test result baseline recording and checking. """ 1715N/A # filename from which to get or store baseline results 1715N/A # 'generating' keeps track of whether we are currently 1715N/A # generating a baseline or not: if either the baseline doesn't 1715N/A # exist or the "-g" option is specified on the commandline. 1715N/A # List of tuples (name, result) for failed tests 1715N/A # dict of "test name" -> "result" 430N/A """Add a result if we're generating the baseline file, 1715N/A otherwise check it against the current result set. 1715N/A Returns a value to indicate whether the result matched 1715N/A # The assumption if we're generating, or if we don't 1715N/A # have a result in baseline, is that the test should pass. 430N/A """Return the list of failed tests.""" 430N/A """Display all test cases that failed to match the baseline 3143N/A print(
"BASELINE MISMATCH: The following results didn't " 430N/A """Store the result set.""" 430N/A # Only store the result set if we're generating a baseline 3143N/A # Sort the results to make baseline diffs easier 430N/A """Load the result set."""