harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r545554 [11/13] - in /harmony/enhanced/buildtest/branches/2.0/tests/reliability: ./ run/ src/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/harmony/ src/java/org/apache/harmony/test/ src/java/org/apache/harmony/test/relia...
Date Fri, 08 Jun 2007 16:35:10 GMT
Added: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTest.java?view=auto&rev=545554
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTest.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTest.java Fri Jun  8 09:34:52 2007
@@ -0,0 +1,394 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @author Nikolay V. Bannikov
+ * @version $Revision: 1.1 $
+ */
+
+package org.apache.harmony.test.reliability.api.zip;
+
+import org.apache.harmony.test.reliability.share.Test;
+import org.apache.harmony.test.reliability.share.Result;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.FileNotFoundException;
+import java.util.zip.DataFormatException;
+import java.util.zip.Deflater;
+import java.util.zip.Inflater;
+
+/**
+ * The test does:
+ *    1. Reads parameters, which are:
+ *          param[0] - number of deflating/inflating threads to run in parallel
+ *          param[1] - directory where input file is located
+ *          param[2] - number of bytes to read from the file
+ *          param[3] - input file name
+ *          param[4] - number of deflating/inflating iterations each thread does
+ *
+ *     2. Starts and, then, joins all started threads
+ *
+ *     3. Checks that in each thread all checks PASSed.
+ *
+ *     4. Each thread, being started:
+ *
+ *        a. Reads from input file (param[1] + "/" + param[3]) param[2] bytes, closes input stream
+ *
+ *        b. In each of param[4] iterations:
+ *           - Deflates and then inflates read bytes (number of read bytes and the bytes itself are
+ *             the same in each thread, on each iteration).
+ *           - Compares that deflated/inflated byte array is byte-to-byte equal to the the original 
+ *             one (read from input file).
+ *           - Calls System.gc().
+ */
+
+public class ZlibTest extends Test {
+
+    // Each thread does NUMBER_OF_INFL_DEFL_ITERATIONS inflation/deflation operations
+    public int NUMBER_OF_INFL_DEFL_ITERATIONS = 10;
+
+    // Directory where input file is located
+    public String path_to_file;
+
+    // Input file name
+    public String fileName = "Test.out";
+
+    // How much bytes to read from the input file into byte array
+    public int bufferSize = 1024;
+
+    // Number of threads to run in parallel
+    public int numThreads = 1;
+
+    public int callSystemGC = 1;
+
+    // Each thread sets PASS/FAIL flag into its corresponding array element
+    public int[] statuses;
+
+
+    public static void main(String[] args) {
+        System.exit(new ZlibTest().test(args));
+    }
+
+
+    public int test(String[] params) {
+    
+        parseParams(params);
+
+
+        // Start 'numThreads' threads each reading from file, inflating/deflating
+
+        Thread[] t = new Thread[numThreads];
+
+        statuses = new int[t.length];
+                                
+        for (int i = 0; i < t.length; i++) {
+            t[i] = new Thread(new InflaterDeflaterThread(i, this));
+            t[i].start();
+            //log.add("Thread " + i + " started");
+        }
+                
+        // Correctly wait for all threads to finish
+
+        for (int i = 0; i < t.length; ++i){
+            try {
+                t[i].join();
+                //log.add("Thread " + i + ": joined() ");
+
+            } catch (InterruptedException ie){
+                return fail("interruptedException while join() of thread #" + i);
+            }
+        }
+
+        // For each thread check whether operations/checks PASSed in the thread
+
+        for (int i = 0; i < statuses.length; ++i){
+            if (statuses[i] != Result.PASS){
+                return fail("thread #" + i + " returned not PASS status");
+            }
+            //log.add("Status of thread " + i + ": is PASS");
+        }
+
+        return pass("OK");
+    }
+
+
+    public void parseParams(String[] params) {
+
+        if (params.length >= 1 && Integer.parseInt(params[0]) > 0) {
+            numThreads = Integer.parseInt(params[0]);
+        }        
+
+        if (params.length >= 2) {
+            path_to_file =  params[1];
+        }        
+
+        if (params.length >= 3) {
+            bufferSize= Integer.parseInt(params[2]);
+        }        
+
+        if (params.length >= 4) {
+            fileName = params[3];
+        }
+
+        if (params.length >= 5) {
+            NUMBER_OF_INFL_DEFL_ITERATIONS = Integer.parseInt(params[4]);
+        }        
+
+    }
+
+}
+
+
+class InflaterDeflaterThread implements Runnable {
+
+    public int id;
+    public ZlibTest base;
+
+    public InflaterDeflaterThread(int id, ZlibTest base) {
+        this.id = id;
+        this.base = base;
+    }
+
+    public void run() {
+              
+        // First, the thread reads 'bufferSize' bytes from the input file
+
+        byte[] buffer = getBytesFromFile(base.path_to_file + File.separator +  base.fileName);
+
+        if (buffer == null) {
+            base.statuses[id] = Result.FAIL;
+            base.log.add("Thread " + id + ": buffer of bytes is null...");
+            return;
+        }
+
+        // Second, the thread inflates/deflates read bytes and checks the content of 
+        // original byte array is byte-to-byte equal to deflated/inflated byte array
+        // in each of NUMBER_OF_INFL_DEFL_ITERATIONS iterations.
+
+        for (int i = 0; i < base.NUMBER_OF_INFL_DEFL_ITERATIONS; ++i) {
+
+            // base.log.add("Thread " + id + ", iteration " + i + ": starting compress/decompress iteration");
+
+            byte[] compressed = InflatorDeflator.zlibDef(buffer, 0, buffer.length);
+            byte[] decompressed;
+
+            try {
+
+                decompressed = InflatorDeflator.zlibInf(compressed, 0, compressed.length);
+
+            } catch (DataFormatException e) {
+                base.statuses[id] = Result.FAIL;
+                base.log.add("Thread " + id + ", iteration " + i + ": DataFormatException while Inflating");
+                return;
+            }
+
+            if (!InflatorDeflator.compareArrays(decompressed, buffer)){
+                base.statuses[id] = Result.FAIL;
+                base.log.add("Thread " + id + ", iteration " + i + ": decompressed bytes are not equal to original");
+                return;
+            }
+                        
+            if (base.callSystemGC != 0){
+                System.gc();
+            }
+        }
+
+        base.statuses[id] = Result.PASS;
+    }
+
+
+
+    byte[] getBytesFromFile(String filename) {
+
+        // the method just reads 'bufferSize' bytes from the input file, closes file input stream
+
+        FileInputStream in = null;
+        byte[] buffer;
+        int read = 0;
+
+        try {
+
+            try {
+                in = new FileInputStream(filename);
+            } catch (FileNotFoundException e) {
+                base.statuses[id] = Result.FAIL;
+                base.log.add("Thread " + id + ": FileNotFoundException: file " + filename +" does not exist");
+                base.log.add(e);
+                return null;
+            }
+
+            buffer = new byte[base.bufferSize];
+
+            try {
+                read = in.read(buffer, 0, buffer.length);
+            } catch (IOException e) {
+                base.statuses[id] = Result.FAIL;
+                base.log.add("Thread " + id + ": FileInputStream.read: IOException during test execution");
+                base.log.add(e);
+                return null;
+            }
+
+        } finally {
+            if (in != null){
+                try {
+                    in.close();
+                    //base.log.add("Thread " + id + ": FileInputStream is closed");
+                } catch (IOException ioe) {
+                    base.statuses[id] = Result.FAIL;
+                    base.log.add("Thread " + id + ": IOException while closing InputStream in thread #" + id);
+                }
+            }
+
+        }
+
+        //base.log.add("Thread " + id + ": " + read + " bytes read from file");
+
+        return buffer;
+    }
+
+}
+
+class InflatorDeflator {
+
+    public static byte[] zlibInf(byte[] data, int offset, int inlen) throws DataFormatException {
+        return zlibInf(data, offset, inlen, false);
+    }
+ 
+    public static byte[] zlibInf(byte[] data, int offset, int inlen, boolean nowrap) throws DataFormatException {
+
+        // the method inflates 'data' bytes and returns inflated byte array
+
+        int size = 512;
+        int inlatedBytesNumber = 0;
+        byte[] inflatedArray = null;
+        byte[] tmpArray = null;
+        Inflater inf = new Inflater(nowrap);
+
+        // if (nowrap){
+        //    byte[] add_byte_data = new byte[data.length + 1];
+        //    System.arraycopy(data, 0, add_byte_data, 0, data.length);
+        //    data = add_byte_data;
+        // }
+
+        inf.setInput(data, offset, inlen);
+
+        // we decompress input bytes using dynamic capacity output byte array,
+        // since, we do not know beforehand how many bytes will dempressed array be
+
+        do {
+            // store current 'array of decompressed bytes' in tmp array
+            tmpArray = inflatedArray;
+
+            // increase capacity of 'array of decompressed bytes' by 2x time
+            size = size * 2;
+            inflatedArray = new byte[size];
+
+            // if not first iteration, copy already decompressed bytes from tmp array 
+            // into 'increased capacity array of decompressed bytes'
+
+            if (tmpArray != null) {
+                System.arraycopy(tmpArray, 0, inflatedArray, 0, inlatedBytesNumber);
+            }
+
+            // continue decompression into 'incresed capacity array of decompressed bytes'
+            // starting from last decompressed byte 'inlatedBytesNumber'
+
+            inlatedBytesNumber = inlatedBytesNumber + inf.inflate(inflatedArray, inlatedBytesNumber, size - inlatedBytesNumber);
+
+        } while (!inf.finished());
+
+        // return array of compressed bytes containing only compressed bytes & nothing unrelated
+
+        byte[] b = new byte[inlatedBytesNumber];
+        System.arraycopy(inflatedArray, 0, b, 0, b.length);
+        return b;
+    }
+
+
+    public static byte[] zlibDef(byte[] data, int offset, int length) {
+        return zlibDef(data, offset, length, 0, Deflater.DEFAULT_STRATEGY, false);
+    }
+
+    public static byte[] zlibDef(byte[] data, int offset, int length, int level, int strategy, boolean nowrap) {
+
+        // the method deflates 'data' bytes and returns deflated byte array
+
+        int size = 512;
+        int deflatedBytesNumber = 0;
+        byte[] deflatedArray = null;
+        byte[] tmpArray = null;
+        Deflater def = new Deflater(level, nowrap);
+
+        def.setStrategy(strategy);
+
+        def.setInput(data, offset, length);
+        def.finish();
+
+        // we compress input bytes using dynamic capacity output byte array,
+        // since, we do not know beforehand how many bytes will compressed array be
+
+        while (!def.finished()) {
+
+            // store current 'array of compressed bytes' in tmp array
+
+            tmpArray = deflatedArray;
+
+            // increase capacity of 'array of compressed bytes' by 2x time
+
+            size = size * 2;
+            deflatedArray = new byte[size];
+
+            // if not first iteration, copy already compressed bytes from tmp array 
+            // into 'increased capacity array of compressed bytes'
+
+            if (tmpArray != null) {
+                System.arraycopy(tmpArray, 0, deflatedArray, 0, deflatedBytesNumber);
+            }
+
+            // continue compression into 'incresed capacity array of compressed bytes'
+            // starting from last compressed byte 'deflatedBytesNumber'
+
+            deflatedBytesNumber = deflatedBytesNumber + def.deflate(deflatedArray, deflatedBytesNumber, size - deflatedBytesNumber);
+        }
+                
+        // return array of compressed bytes containing only compressed bytes & nothing unrelated
+
+        byte[] b = new byte[deflatedBytesNumber];
+        System.arraycopy(deflatedArray, 0, b, 0, b.length);
+        return b;
+    }
+
+
+    public static boolean compareArrays(byte[] b1, byte[] b2){
+
+        // the method just compares that two arrays are byte-to-byte equal
+
+        if (b1.length != b2.length) {
+            return false;
+        }
+        for (int i = 0; i< b1.length; ++i){
+            if (b1[i] != b2[i]){
+                return false;
+            }
+        }
+        return true;
+    }
+
+}
+

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTestStrategyLevel.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTestStrategyLevel.java?view=auto&rev=545554
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTestStrategyLevel.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTestStrategyLevel.java Fri Jun  8 09:34:52 2007
@@ -0,0 +1,152 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @author Nikolay V. Bannikov
+ * @version $Revision: 1.1 $
+ */
+
+package org.apache.harmony.test.reliability.api.zip;
+
+import org.apache.harmony.test.reliability.share.Test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.FileNotFoundException;
+import java.util.zip.DataFormatException;
+import java.util.zip.Deflater;
+import java.util.zip.Inflater;
+
+/**
+ * The test does:
+ *    1. Reads parameters, which are:
+ *          param[0] - size of byte buffer to initialize for Delfation/Inflation
+ *
+ *    2. For each combination of <strategy, compression level, wrap | nowrap>:
+ *          a. Byte array of param[0] length with random values from 0..255 is initialized (for
+ *             Deflator to use not only one dictionary).
+ *          b. Deflates (with the given value of strategy, compression level, nowrap) 
+ *             and then inflates the byte array.
+ *          c. Compares that deflated/inflated byte array is byte-to-byte equal to the the original 
+ *             one, i.e. orginal initialized buffer.
+ *          d. Calls System.gc().
+ */
+
+public class ZlibTestStrategyLevel extends Test {
+
+    // In-memory buffer size
+    public int bufferSize = 1024;
+        
+    public int callSystemGC = 1;
+
+    public int[] strategies = new int [] {
+                                             Deflater.DEFAULT_STRATEGY,
+                                             Deflater.HUFFMAN_ONLY,
+                                             Deflater.FILTERED
+                                         };
+        
+    public boolean[] nowrap = new boolean[] {false}; // should be also 'true' 
+
+    public int[] level = new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
+
+    public static void main(String[] args) {
+        System.exit(new ZlibTestStrategyLevel().test(args));
+    }
+
+
+    public int test(String[] params) {
+    
+        parseParams(params);
+                
+        for (int i = 0; i < strategies.length; ++i) {
+
+            for (int j = 0; j < level.length; ++j) {
+
+                for (int k = 0; k < nowrap.length; ++k) {
+
+                    // log.add("strategy: " + strategies[i] + ", level: " + level[j] + ", nowrap: " + nowrap[k]);
+
+                    // Re-initialize byte array for Deflator to use not only one dictionary
+
+                    BufferStorage bs = new BufferStorage();
+                    bs.initialize(bufferSize);
+
+                    // log.add("Byte array buffer of length " + bufferSize + " is initialized");
+
+                    // get a copy of the initialized buffer, deflate it with the given 
+                    // strategy, compression level, nowrap flag
+
+                    byte[] subbuffer = bs.getSubBuffer(bs.buffer.length);
+                    byte[] compressed = InflatorDeflator.zlibDef(subbuffer, 0, subbuffer.length, level[j], strategies[i], nowrap[k]);
+                    byte[] decompressed;
+
+                    try {
+
+                        decompressed = InflatorDeflator.zlibInf(compressed, 0, compressed.length);
+
+                    } catch (DataFormatException e) {
+                        return fail("DataFormatException while Inflating: strategy: " + strategies[i] + ", level: " + level[j] + ", nowrap: " + nowrap[k]);
+                    }
+
+                    if (!InflatorDeflator.compareArrays(decompressed, subbuffer)){
+                        return fail("strategy: " + strategies[i] + ", level: " + level[j] + ", nowrap: " + nowrap[k]+ " : decompressed bytes are not equal to original");
+                    }
+                        
+                    if (callSystemGC != 0){
+                        System.gc();
+                    }
+
+                }
+            }               
+
+        }
+
+        return pass("OK");
+    }
+
+
+    public void parseParams(String[] params) {
+
+        if (params.length >= 1) {
+            bufferSize = Integer.parseInt(params[0]);
+        }
+
+    }
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTestStrategyLevel.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTestVariableLength.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTestVariableLength.java?view=auto&rev=545554
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTestVariableLength.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTestVariableLength.java Fri Jun  8 09:34:52 2007
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @author Nikolay V. Bannikov
+ * @version $Revision: 1.1 $
+ */
+
+package org.apache.harmony.test.reliability.api.zip;
+
+import org.apache.harmony.test.reliability.share.Test;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.FileNotFoundException;
+import java.util.zip.DataFormatException;
+import java.util.zip.Deflater;
+import java.util.zip.Inflater;
+import java.util.Random;
+
+/**
+ * The test does:
+ *    1. Reads parameters, which are:
+ *          param[0] - size of byte buffer to initialize for Delfation/Inflation
+ *          param[1] - number of Deflate/Inflate iterations
+ *
+ *    2. Initializes byte array of param[0] length with random values from 0..255.
+ *
+ *    3. Number of Deflate/Inflate iterations is equal to the size of byte buffer (param[0]).
+ *       On each iteration:
+ *          a. Receives subbuffer of length equal to iteration number. Each next Deflate/Inflate
+ *             operation works with a byte buffer of larger size.
+ *          b. Deflates and then inflates the subbuffer.
+ *          c. Compares that deflated/inflated byte array is byte-to-byte equal to the the original 
+ *             one, i.e. subbuffer.
+ *          d. Calls System.gc().
+ */
+
+public class ZlibTestVariableLength extends Test {
+
+    // In-memory buffer size
+    public int bufferSize = 1024;
+        
+    public int NumberOfIterations = 100;
+
+    public int callSystemGC = 1;
+
+
+    public static void main(String[] args) {
+        System.exit(new ZlibTestVariableLength().test(args));
+    }
+
+
+    public int test(String[] params) {
+    
+        parseParams(params);
+
+        // initialize a byte buffer which will be compressed/decompressed
+
+        BufferStorage bs = new BufferStorage();
+        bs.initialize(bufferSize);
+
+        //log.add("Byte array buffer of length " + bufferSize + " is initialized");
+                  
+        int step = (bufferSize / NumberOfIterations) < 1 ? 1 : (bufferSize / NumberOfIterations);
+
+        for (int i = 1; i < bs.buffer.length; i = i + step) {
+
+            byte[] subbuffer = bs.getSubBuffer(i);
+            byte[] compressed = InflatorDeflator.zlibDef(subbuffer, 0, subbuffer.length);
+            byte[] decompressed;
+
+            try {
+
+                decompressed = InflatorDeflator.zlibInf(compressed, 0, compressed.length);
+
+            } catch (DataFormatException e) {
+                return fail("DataFormatException while Inflating on iteration: " + i);
+            }
+
+            if (!InflatorDeflator.compareArrays(decompressed, subbuffer)){
+                return fail("Iteration " + i + ": decompressed bytes are not equal to original");
+            }
+                        
+            if (callSystemGC != 0){
+                System.gc();
+            }
+        }
+
+        return pass("OK");
+    }
+
+
+    public void parseParams(String[] params) {
+
+        if (params.length >= 1) {
+            bufferSize = Integer.parseInt(params[0]);
+        }
+
+        if (params.length >= 2) {
+            NumberOfIterations = Integer.parseInt(params[1]);
+        }
+
+
+    }
+
+}
+
+
+class BufferStorage {
+
+    public byte[] buffer = null;
+
+    public void initialize(int bufferSize) {
+
+        if (buffer == null){
+
+            buffer = new byte[bufferSize];
+
+            // why random? - to avoid small vocabulary
+            Random rand = new Random(100);
+
+            for (int i = 0; i < bufferSize; ++i) {
+                buffer[i] = (byte) rand.nextInt(Byte.MAX_VALUE);
+            }
+        }
+    }
+
+
+    public byte[] getSubBuffer(int i){
+
+        byte[] b = new byte[i];
+
+        System.arraycopy(buffer, 0, b, 0, b.length);
+
+        return b;
+    }
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/ZlibTestVariableLength.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/auxiliary/Test.out
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/auxiliary/Test.out?view=auto&rev=545554
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/auxiliary/Test.out (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/api/zip/auxiliary/Test.out Fri Jun  8 09:34:52 2007
@@ -0,0 +1,1107 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+public class Test {
+    static void createFrame() {
+	new javax.swing.JFrame();
+        System.out.println("PASSED"); 
+    } 
+    public static void main(String args[]) throws Exception { 
+        javax.swing.SwingUtilities.invokeLater(new Runnable() {public void run() { createFrame(); }});
+    } 
+} 
+

Added: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/JarFilesScanner.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/JarFilesScanner.java?view=auto&rev=545554
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/JarFilesScanner.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/JarFilesScanner.java Fri Jun  8 09:34:52 2007
@@ -0,0 +1,109 @@
+/*
+ * Copyright 2007 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @author Aleksey Ignatenko
+ * @version $Revision: 1.0 $
+ */
+
+/**
+ * The GOAL: to provide developer with working data:
+ * number of jar files in JRE 
+ */
+
+package org.apache.harmony.test.reliability.share;
+
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+import java.io.File;
+import java.io.IOException;
+
+public class JarFilesScanner{
+    static final String JAR_FILE_EXTENSION = ".jar";    
+    static final String CLASS_FILE_EXTENSION = ".class";
+    static ArrayList<String> jarFiles = new ArrayList<String>(); // contains names of found jar files
+    static ArrayList<String> classFiles = new ArrayList<String>(); // contains names of found class files
+    static Boolean cache = false;
+
+    public ArrayList<String> getJarFilesInJRE(){
+        if (cache == false) {
+            String rootDir = getDirToScanForJarFiles();
+            scanDirForJarFiles(rootDir);
+            cache = true;
+        }
+        return jarFiles;
+    }
+
+    public ArrayList<String> getClassFilesInJRE(){
+        if (cache == false)
+        {
+            getJarFilesInJRE();
+            for (int i=0; i<jarFiles.size(); i++ ){
+                ZipFile xf;
+                try {
+                    xf = new ZipFile(jarFiles.get(i));
+                    Enumeration en = xf.entries();
+                    while(en.hasMoreElements()){
+                        ZipEntry ze = (ZipEntry) en.nextElement();
+                        String zeName = ze.getName();
+                        if (zeName.endsWith(CLASS_FILE_EXTENSION)){ 
+                            classFiles.add(ze.getName());
+                        }
+                    }
+                    xf.close();
+                } catch (IOException e) {
+                }
+            }           
+        }
+        return classFiles;
+    }
+
+    String getDirToScanForJarFiles() {
+        return System.getProperty("java.home");
+    }
+
+    void scanDirForJarFiles(String rootDir) {
+
+        try {
+
+            File fl = new File (rootDir);
+            File[] files = fl.listFiles();
+
+            for (int i = 0; i < files.length; i++) {
+
+                if (files[i].isDirectory()){
+                    scanDirForJarFiles(files[i].getAbsolutePath());
+                    continue;
+                }
+
+                if (files[i].getName().endsWith(JAR_FILE_EXTENSION)){
+                    jarFiles.add(files[i].getAbsolutePath());
+                }
+            }
+
+            // cleanup
+            files = null;
+            fl = null;
+            System.gc();
+        } catch(Exception ex) {
+            throw new RuntimeException("Failed to scan JAR files " +  ex.getMessage());
+        }
+    }
+
+}
\ No newline at end of file

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/JarFilesScanner.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Log.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Log.java?view=auto&rev=545554
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Log.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Log.java Fri Jun  8 09:34:52 2007
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @author Oleg Oleinik
+ * @version $Revision: 1.1 $
+ */
+
+package org.apache.harmony.test.reliability.share;
+
+public class Log {
+
+    public void add(String msg) {
+        synchronized (this) {
+            System.out.println("" + msg);
+        }
+    }
+
+    public void info(String msg) {
+        add(msg);
+    }
+
+    public void add(Exception e) {
+        e.printStackTrace();
+    }
+}

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Log.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/LongRunningTestStarter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/LongRunningTestStarter.java?view=auto&rev=545554
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/LongRunningTestStarter.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/LongRunningTestStarter.java Fri Jun  8 09:34:52 2007
@@ -0,0 +1,120 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.harmony.test.reliability.share;
+
+import java.util.Arrays;
+import java.util.Calendar;
+
+import org.apache.harmony.test.reliability.share.Test;
+import org.apache.harmony.test.reliability.share.Result;
+
+/**
+ * @author Tatyana V. Doubtsova
+ * @version $Revision: 1.2 $
+ */
+
+public class LongRunningTestStarter extends Test {
+
+    int testTimeOut = 600;  // 10 minutes
+
+    String[] testArgs = null;
+
+    String testClassName = null;
+    
+    protected int parseArgs(String[] args) {
+        
+        if (args == null) {
+            return 0;            
+        }
+
+        for (int i = 0; i < args.length; i++) {
+            if (args[i].equalsIgnoreCase("-testClassName")){
+                testClassName = args[i + 1];
+                testArgs = new String[args.length - i - 2];
+                
+                for (int j = i + 2; j < args.length; ++j) {
+                    testArgs[j - i - 2] = args[j];
+                }
+            }
+            if (args[i].equalsIgnoreCase("-testTimeOut")) {
+                testTimeOut = Integer.parseInt(args[i + 1]);
+            }
+        }
+        
+        if (testClassName == null) {
+            log.add("No test to run");
+            return 100;
+        }
+
+        return 0;
+    }
+    
+
+    public int test(String args[]) {
+        int result = Result.ERROR;
+
+        if (parseArgs(args) != 0) {
+            return error("LongRunningTestStarter: Invalid arguments, should be " +
+                " -testTimeOut <secs> -testClassName <test's fully qualified class name> " +
+                " <optional, test param1> <etc.>");
+        }
+
+        long curTime = Calendar.getInstance().getTimeInMillis();
+        long startTime = curTime;
+        long endTime = curTime + (int) (testTimeOut * 1000 * 0.9f);
+
+        long iterTime = 0;
+        int iteration = 0;
+        try {
+            while (curTime < endTime) {
+                result = ((Test) Class.forName(testClassName).newInstance()).test(testArgs);
+                System.gc();
+                
+                if (result != Result.PASS) {
+                    log.add("*** iteration: " + iteration);
+                    log.add("test result is " + result);
+                    log.add("Test FAILED");
+                    return result;
+                }
+                
+                curTime = Calendar.getInstance().getTimeInMillis();
+                if (iteration == 0) {
+                    iterTime = curTime - startTime;
+                    long tmp = curTime + (int) (testTimeOut * 1000 - iterTime * 4);
+                    endTime = tmp > endTime ? endTime : tmp;
+                }
+                iteration++;
+            }
+        } catch (Exception e) {
+            log.add("*** iteration: " + iteration);
+            log.add("Exception during test execution: " + e);
+            e.printStackTrace();
+            log.add("Test FAILED");
+            return Result.ERROR;
+        }
+        log.add("*** Total run iterations: " + iteration);
+        log.add("Test result is " + result);
+        log.add("Test PASSED");
+        return result;
+    }
+
+    public static void main(String[] args) {
+        System.exit(new LongRunningTestStarter().test(args));
+    }
+
+}

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/LongRunningTestStarter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/ReliabilityTestStarter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/ReliabilityTestStarter.java?view=auto&rev=545554
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/ReliabilityTestStarter.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/ReliabilityTestStarter.java Fri Jun  8 09:34:52 2007
@@ -0,0 +1,67 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/** 
+ * @author Tatyana V. Doubtsova
+ * @version $Revision: 1.2 $
+ */  
+package org.apache.harmony.test.reliability.share;
+
+import org.apache.harmony.test.reliability.share.Test;
+import org.apache.harmony.test.reliability.share.Result;
+
+public class ReliabilityTestStarter extends Test{
+    
+    String testReliabilityMode = "longrunning";
+    int testReliabilityModePosition = -1;
+    
+    protected int parseArgs(String[] args) {
+        if (args == null) {
+            return 0;            
+        }
+        for (int i = 0; i < args.length; i++) {
+            if (args[i].equalsIgnoreCase("-testReliabilityMode")) {
+                testReliabilityModePosition = i;
+                testReliabilityMode = args[i + 1];
+            }
+        }
+        return 0;
+    }
+
+    public int test(String args[]) {
+        int result = Result.ERROR;
+
+        parseArgs(args);
+
+        if (testReliabilityMode.equalsIgnoreCase("longrunning")) {
+            return new LongRunningTestStarter().test(args);
+        }
+
+        //if (testReliabilityMode.equalsIgnoreCase("monitor")) {
+        //    return new ResourceMonitorTestStarter().test(args);            
+        //}
+        
+        log.add("ReliabilityTestStarter: Unknown Reliability Mode " + testReliabilityMode +
+            ", should be \"longrunning\" ");
+        return Result.ERROR;
+    }
+
+    public static void main(String[] args) {
+        System.exit(new ReliabilityTestStarter().test(args));
+    }
+
+}

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/ReliabilityTestStarter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Reporter.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Reporter.java?view=auto&rev=545554
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Reporter.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Reporter.java Fri Jun  8 09:34:52 2007
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/** 
+ * @author Tatyana V. Doubtsova
+ * @version $Revision: 1.2 $
+ */
+package org.apache.harmony.test.reliability.share;
+
+public interface Reporter {
+
+    public void report(String message);
+
+    public void setResult(int res);
+
+    public int getResult();
+}
\ No newline at end of file

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Reporter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Result.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Result.java?view=auto&rev=545554
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Result.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Result.java Fri Jun  8 09:34:52 2007
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @author Vladimir A. Ivanov
+ * @version $Revision: 1.1 $
+ */
+
+package org.apache.harmony.test.reliability.share;
+
+public class Result {
+
+    public static final int PASS       = 104;
+    public static final int FAIL       = 105;
+    public static final int ERROR      = 106;
+    public static final int MODE_ERROR = 107;
+
+    private int             status     = 0;
+    private String          msg;
+
+    public Result(int execStat, String repMsg) {
+        status = execStat;
+        msg = repMsg;
+    }
+
+    public int getResult() {
+        return status;
+    }
+
+    public String getMessage() {
+        return msg;
+    }
+}
\ No newline at end of file

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Result.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Test.java?view=auto&rev=545554
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Test.java (added)
+++ harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Test.java Fri Jun  8 09:34:52 2007
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @author Oleg Oleinik
+ * @version $Revision: 1.1 $
+ */
+
+package org.apache.harmony.test.reliability.share;
+
+public abstract class Test {
+
+    public static Log log = new Log();
+
+    public int pass() {
+        return pass("PASSED");
+    }
+
+    public int pass(String msg) {
+        log.add(msg);
+        return Result.PASS;
+    }
+
+    public int fail(String msg) {
+        log.add(msg);
+        return Result.FAIL;
+    }
+
+    public int error(String msg) {
+        log.add(msg);
+        return Result.ERROR;
+    }
+
+    public int test(String[] args) {
+        return Result.PASS;
+    }
+}
+    
\ No newline at end of file

Propchange: harmony/enhanced/buildtest/branches/2.0/tests/reliability/src/java/org/apache/harmony/test/reliability/share/Test.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message