java/src/org/apache/qetest/xsl/BugzillaTestletDriver.java [356:395]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void executeTestletInDir(Testlet t, Datalet d, String dir)
        throws Exception
    {
        final String USER_DIR = "user.dir";
        try
        {
            // Note: we must actually keep a cloned copy of the 
            //  whole system properties block to replace later 
            //  in case a Bugzilla testlet changes any other 
            //  properties during it's execution
            Properties p = System.getProperties();
            Properties cacheProps = (Properties)p.clone();
            // This should, I hope, properly get the correct path 
            //  for what the inputDir would be, whether it's a 
            //  relative or absolute path from where we are now
            File f = new File(inputDir);
            try
            {
                // Note the canonical form seems to be the most reliable for our purpose
                p.put(USER_DIR, f.getCanonicalPath());
            } 
            catch (IOException ioe)
            {
                p.put(USER_DIR, f.getAbsolutePath());
            }
            System.setProperties(p);

            // Now just execute the Testlet from here
            t.execute(d);

            // Replace the system properties to be polite!
            System.setProperties(cacheProps);
        } 
        catch (SecurityException se)
        {
            reporter.logThrowable(Logger.ERRORMSG, se, "executeTestletInDir threw");
            reporter.checkErr("executeTestletInDir threw :" + se 
                    + " cannot execute Testlet in correct dir " + dir);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



java/src/org/apache/qetest/xsl/JiraTestletDriver.java [355:394]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void executeTestletInDir(Testlet t, Datalet d, String dir)
        throws Exception
    {
        final String USER_DIR = "user.dir";
        try
        {
            // Note: we must actually keep a cloned copy of the 
            //  whole system properties block to replace later 
            //  in case a Jira testlet changes any other 
            //  properties during it's execution
            Properties p = System.getProperties();
            Properties cacheProps = (Properties)p.clone();
            // This should, I hope, properly get the correct path 
            //  for what the inputDir would be, whether it's a 
            //  relative or absolute path from where we are now
            File f = new File(inputDir);
            try
            {
                // Note the canonical form seems to be the most reliable for our purpose
                p.put(USER_DIR, f.getCanonicalPath());
            } 
            catch (IOException ioe)
            {
                p.put(USER_DIR, f.getAbsolutePath());
            }
            System.setProperties(p);

            // Now just execute the Testlet from here
            t.execute(d);

            // Replace the system properties to be polite!
            System.setProperties(cacheProps);
        } 
        catch (SecurityException se)
        {
            reporter.logThrowable(Logger.ERRORMSG, se, "executeTestletInDir threw");
            reporter.checkErr("executeTestletInDir threw :" + se 
                    + " cannot execute Testlet in correct dir " + dir);
        }
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



