try {  Properties properties = AllTests.loadProperties(ourPropertiesFile); String pythonTestsRoot = properties.getProperty("python.tests"); properties.setProperty("repository.root", new File(pythonTestsRoot).getAbsolutePath());  AllTests.startSVNServe(properties);   String pythonLauncher = properties.getProperty("python.launcher"); String testSuite = properties.getProperty("python.tests.suite"); String options = properties.getProperty("python.tests.options", ""); for(StringTokenizer tests = new StringTokenizer(testSuite, ","); tests.hasMoreTokens();) { String testFile = tests.nextToken(); testFile = testFile.trim(); String testNumber = ""; if (testFile.indexOf(' ') >= 0) { testNumber = testFile.substring(testFile.lastIndexOf(' ') + 1); testFile = testFile.substring(0, testFile.indexOf(' ')); } testFile = testFile + "_tests.py"; String[] commands = new String[] { pythonLauncher, testFile, "-v", "--url=svn: options, testNumber, }; System.out.println("RUNNING PYTHON TESTS: " + testFile + " " + testNumber); try { Process process = Runtime.getRuntime().exec(commands, null, new File("python/cmdline")); new ReaderThread(process.getInputStream()).start(); new ReaderThread(process.getErrorStream()).start(); try { process.waitFor(); } catch (InterruptedException e) { } } catch (Throwable th) { System.err.println("ERROR: " + th.getMessage()); th.printStackTrace(System.err); } } } catch(Throwable th) { th.printStackTrace(); } finally { AllTests.stopSVNServe(); } }
try {  Properties properties = AllTests.loadProperties(ourPropertiesFile); String pythonTestsRoot = properties.getProperty("python.tests"); properties.setProperty("repository.root", new File(pythonTestsRoot).getAbsolutePath());  AllTests.startSVNServe(properties);   String pythonLauncher = properties.getProperty("python.launcher"); String testSuite = properties.getProperty("python.tests.suite"); String options = properties.getProperty("python.tests.options", ""); for (StringTokenizer tests = new StringTokenizer(testSuite, ","); tests.hasMoreTokens();) { final String testFileString = tests.nextToken(); List tokens = tokenizeTestFileString(testFileString);  final String testFile = tokens.get(0) + "_tests.py"; tokens = tokens.subList(1, tokens.size());  if (tokens.isEmpty()) { System.out.println("PROCESSING ALL " + testFile); processTestCase(pythonLauncher, testFile, options, ""); } else { final List availabledTestCases = getAvailableTestCases(pythonLauncher, testFile); final List testCases = combineTestCases(tokens, availabledTestCases);  System.out.println("PROCESSING " + testFile + " " + testCases); for (Iterator it = testCases.iterator(); it.hasNext();) { final Integer testCase = (Integer)it.next(); processTestCase(pythonLauncher, testFile, options, String.valueOf(testCase)); } } } } catch (Throwable th) { th.printStackTrace(); } finally { AllTests.stopSVNServe(); } }
    public static void main(String[] args) {        String fileName = args[0];        ourPropertiesFile = new File(fileName);        try {            // 1. start svnserve            Properties properties = AllTests.loadProperties(ourPropertiesFile);            String pythonTestsRoot = properties.getProperty("python.tests");            properties.setProperty("repository.root", new File(pythonTestsRoot).getAbsolutePath());                        AllTests.startSVNServe(properties);                        // 3. run python tests.            String pythonLauncher = properties.getProperty("python.launcher");            String testSuite = properties.getProperty("python.tests.suite");            String options = properties.getProperty("python.tests.options", "");             for(StringTokenizer tests = new StringTokenizer(testSuite, ","); tests.hasMoreTokens();) {                String testFile = tests.nextToken();                testFile = testFile.trim();                                String testNumber = "";                if (testFile.indexOf(' ') >= 0) {                    testNumber = testFile.substring(testFile.lastIndexOf(' ') + 1);                    testFile = testFile.substring(0, testFile.indexOf(' '));                }                testFile = testFile + "_tests.py";                String[] commands = new String[] {                        pythonLauncher,                        testFile,                        "-v",                        "--url=svn://localhost",                        options,                        testNumber,                };                      System.out.println("RUNNING PYTHON TESTS: " + testFile + " " + testNumber);                try {                    Process process = Runtime.getRuntime().exec(commands, null, new File("python/cmdline"));                    new ReaderThread(process.getInputStream()).start();                    new ReaderThread(process.getErrorStream()).start();                    try {                        process.waitFor();                    } catch (InterruptedException e) {                                    }                } catch (Throwable th) {                    System.err.println("ERROR: " + th.getMessage());                    th.printStackTrace(System.err);                }            }        } catch(Throwable th) {            th.printStackTrace();        } finally {            AllTests.stopSVNServe();        }   }