java/src/org/apache/qetest/xsl/BugzillaTestletDriver.java [95:148]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void processInputDir()
    {
        // Ensure the inputDir is there - we must have a valid location for input files
        File testDirectory = new File(inputDir);

        if (!testDirectory.exists())
        {
            // Try a default inputDir
            String oldInputDir = inputDir; // cache for potential error message
            testDirectory = new File((inputDir = getDefaultInputDir()));
            if (!testDirectory.exists())
            {
                // No inputDir, can't do any tests!
                // @todo check if this is the best way to express this
                reporter.checkErr("inputDir(" + oldInputDir
                                  + ", or " + inputDir + ") does not exist, aborting!");
                return;
            }
        }

        // Validate that each of the specified dirs exists
        // Returns directory references like so:
        //  testDirectory = 0, outDirectory = 1, goldDirectory = 2
        File[] dirs = validateDirs(new File[] { testDirectory }, 
                                   new File[] { new File(outputDir), new File(goldDir) });

        if (null == dirs)  // this should never happen...
        {
            // No inputDir, can't do any tests!
            // @todo check if this is the best way to express this
            reporter.checkErr("inputDir(" + dirs[0] + ") does not exist, aborting!");
            return;
        }

        // Call worker method to process the individual directory
        //  and get a list of .java or .xsl files to test
        Vector files = getFilesFromDir(dirs[0], getFileFilter(), embedded);

        // 'Transform' the list of individual test files into a 
        //  list of Datalets with all fields filled in
        //@todo should getFilesFromDir and buildDatalets be combined?
        Vector datalets = buildDatalets(files, dirs[0], dirs[1], dirs[2]);

        if ((null == datalets) || (0 == datalets.size()))
        {
            // No tests, log error and return
            //  other directories to test
            reporter.checkErr("inputDir(" + dirs[0] + ") did not contain any tests, aborting!");
            return;
        }

        // Now process the list of files found in this dir
        processFileList(datalets, "Bugzilla tests of: " + dirs[0]);
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



java/src/org/apache/qetest/xsl/JiraTestletDriver.java [95:148]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void processInputDir()
    {
        // Ensure the inputDir is there - we must have a valid location for input files
        File testDirectory = new File(inputDir);

        if (!testDirectory.exists())
        {
            // Try a default inputDir
            String oldInputDir = inputDir; // cache for potential error message
            testDirectory = new File((inputDir = getDefaultInputDir()));
            if (!testDirectory.exists())
            {
                // No inputDir, can't do any tests!
                // @todo check if this is the best way to express this
                reporter.checkErr("inputDir(" + oldInputDir
                                  + ", or " + inputDir + ") does not exist, aborting!");
                return;
            }
        }

        // Validate that each of the specified dirs exists
        // Returns directory references like so:
        //  testDirectory = 0, outDirectory = 1, goldDirectory = 2
        File[] dirs = validateDirs(new File[] { testDirectory }, 
                                   new File[] { new File(outputDir), new File(goldDir) });

        if (null == dirs)  // this should never happen...
        {
            // No inputDir, can't do any tests!
            // @todo check if this is the best way to express this
            reporter.checkErr("inputDir(" + dirs[0] + ") does not exist, aborting!");
            return;
        }

        // Call worker method to process the individual directory
        //  and get a list of .java or .xsl files to test
        Vector files = getFilesFromDir(dirs[0], getFileFilter(), embedded);

        // 'Transform' the list of individual test files into a 
        //  list of Datalets with all fields filled in
        //@todo should getFilesFromDir and buildDatalets be combined?
        Vector datalets = buildDatalets(files, dirs[0], dirs[1], dirs[2]);

        if ((null == datalets) || (0 == datalets.size()))
        {
            // No tests, log error and return
            //  other directories to test
            reporter.checkErr("inputDir(" + dirs[0] + ") did not contain any tests, aborting!");
            return;
        }

        // Now process the list of files found in this dir
        processFileList(datalets, "Jira tests of: " + dirs[0]);
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



