TestHelper.java revision 5272
1612N/A * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. 1612N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1612N/A * This code is free software; you can redistribute it and/or modify it 1612N/A * under the terms of the GNU General Public License version 2 only, as 1612N/A * published by the Free Software Foundation. 1612N/A * This code is distributed in the hope that it will be useful, but WITHOUT 1612N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1612N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1612N/A * version 2 for more details (a copy is included in the LICENSE file that 1612N/A * You should have received a copy of the GNU General Public License version 1612N/A * 2 along with this work; if not, write to the Free Software Foundation, 1612N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1612N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1612N/A * or visit www.oracle.com if you need additional information or have any * This class provides some common utilities for the launcher tests. // commonly used jtreg constants // make a note of the golden default locale throw new Error(
"property test.classes not defined ??");
throw new Error(
"property test.src not defined ??");
"> must exist and should be executable");
"> must exist and should be executable");
"> must exist and should be executable");
"> must exist and should be executable");
* is a dual mode available in the test jdk * get the complementary jre arch ie. if sparc then return sparcv9 and * A convenience method to create a jar with jar file name and defs * A convenience method to create a java file, compile and jar it up, using * the sole class file name in the jar, as the Main-Class attribute value. * A convenience method to compile java files. throw new Error(
"compilation failed: " +
sarg);
* A generic jar file creator to create a java file, compile it * and jar it up, a specific Main-Class entry name in the * manifest can be specified or a null to use the sole class file name * as the Main-Class attribute value. (
debug) ?
"cvfe" :
"cfe",
* A method which executes a java cmd and returns the results in a container * A class to encapsulate the test results and stuff, with some ease * of use methods to check the test results. * Indicates that the annotated method is a test method. public @
interface Test {}