Commit:    c5942b613fe3f41f7e647a1f80cbe9e13f3ae7ff
Author:    Matt Ficken <v-maf...@microsoft.com>         Thu, 7 Feb 2013 
15:46:20 -0800
Parents:   817757c8c3263f206d71bac84085f1aca1b21169
Branches:  master

Link:       
http://git.php.net/?p=pftt2.git;a=commitdiff;h=c5942b613fe3f41f7e647a1f80cbe9e13f3ae7ff

Log:
windebug tips


Former-commit-id: 04643b6a8f0110a6c85dfffd74f89ad4798aca8c

Changed paths:
  M  src/com/mostc/pftt/host/PSCAgentServer.java
  M  src/com/mostc/pftt/main/PfttMain.java
  M  src/com/mostc/pftt/model/core/EAcceleratorType.java
  M  src/com/mostc/pftt/model/core/PhptSourceTestPack.java
  M  src/com/mostc/pftt/model/core/PhptTestCase.java
  M  src/com/mostc/pftt/model/sapi/AbstractManagedProcessesWebServerManager.java
  M  src/com/mostc/pftt/model/sapi/ApacheManager.java
  M  src/com/mostc/pftt/model/sapi/BuiltinWebServerManager.java
  M  src/com/mostc/pftt/model/sapi/IISManager.java
  M  src/com/mostc/pftt/model/sapi/WebServerManager.java
  M  src/com/mostc/pftt/report/FBCReportGen.groovy
  M  src/com/mostc/pftt/results/ConsoleManager.java
  M  src/com/mostc/pftt/results/LocalConsoleManager.java
  M  src/com/mostc/pftt/results/PhpResultPackWriter.java
  M  src/com/mostc/pftt/runner/AbstractLocalTestPackRunner.java
  M  src/com/mostc/pftt/runner/LocalPhptTestPackRunner.java
  M  src/com/mostc/pftt/scenario/APCScenario.java
  M  src/com/mostc/pftt/scenario/AbstractCodeCacheScenario.java
  M  src/com/mostc/pftt/scenario/AbstractDatabaseScenario.java
  M  src/com/mostc/pftt/scenario/AbstractNetworkedServiceScenario.java
  M  src/com/mostc/pftt/scenario/AbstractWebServerScenario.java
  M  src/com/mostc/pftt/scenario/FTPScenario.java
  M  src/com/mostc/pftt/scenario/HTTPScenario.java
  M  src/com/mostc/pftt/scenario/IMAPScenario.java
  M  src/com/mostc/pftt/scenario/LDAPScenario.java
  M  src/com/mostc/pftt/scenario/MSAccessScenario.java
  M  src/com/mostc/pftt/scenario/MSSQLODBCScenario.java
  M  src/com/mostc/pftt/scenario/MSSQLScenario.java
  M  src/com/mostc/pftt/scenario/MySQLScenario.java
  M  src/com/mostc/pftt/scenario/PostgresSQLScenario.java
  M  src/com/mostc/pftt/scenario/SOAPScenario.java
  M  src/com/mostc/pftt/scenario/SQLite3Scenario.java
  M  src/com/mostc/pftt/scenario/Scenario.java
  M  src/com/mostc/pftt/scenario/ScenarioSet.java
  M  src/com/mostc/pftt/scenario/WinCacheScenario.java
  M  src/com/mostc/pftt/scenario/XMLRPCScenario.java
  A  src/com/mostc/pftt/scenario/ZendOptimizerPlusScenario.java
  M  src/com/mostc/pftt/util/HostEnvUtil.java
  M  src/com/mostc/pftt/util/WinDebugManager.java

diff --git a/src/com/mostc/pftt/host/PSCAgentServer.java 
b/src/com/mostc/pftt/host/PSCAgentServer.java
index 95ca406..e3c4e13 100644
--- a/src/com/mostc/pftt/host/PSCAgentServer.java
+++ b/src/com/mostc/pftt/host/PSCAgentServer.java
@@ -210,6 +210,9 @@ public abstract class PSCAgentServer implements 
ConsoleManager, ITestResultRecei
        
        @Override
        public void println(EPrintType type, String ctx_str, String string) {
+               if (type==EPrintType.TIP)
+                       return; // ignore
+               
                sendMessage("<println type=\""+type+"\" 
ctx=\""+ctx_str+"\">"+string+"</println>");
        }
        
diff --git a/src/com/mostc/pftt/main/PfttMain.java 
b/src/com/mostc/pftt/main/PfttMain.java
index a402bc4..7b1eca2 100644
--- a/src/com/mostc/pftt/main/PfttMain.java
+++ b/src/com/mostc/pftt/main/PfttMain.java
@@ -88,9 +88,6 @@ import 
com.mostc.pftt.util.WindowsSnapshotDownloadUtil.FindBuildTestPackPair;
  */
 
 // TODO phpt_all, etc... should display location of result-pack being written
-// XXX ? only compress .xml result files that are for FAIL or XFAIL_WORKS or 
CRASH or TEST_EXPCEPTION
-//           -then discard if PASS, SKIP or XSKIP
-//         -would still save list of tests for each status
 public class PfttMain {
        protected AHost host;
        
@@ -710,7 +707,8 @@ public class PfttMain {
                        } else if (args[args_i].equals("-randomize_order")) {
                                randomize_order = true;
                        } else if (args[args_i].equals("-run_test_times")) {
-                               run_test_times = 
Integer.parseInt(args[args_i++]);
+                               args_i++;
+                               run_test_times = Integer.parseInt(args[args_i]);
                        } else if 
(args[args_i].equals("-disable_debug_prompt")) {
                                disable_debug_prompt = true; 
                        } else if (args[args_i].equals("-results_only")) {
@@ -809,7 +807,7 @@ public class PfttMain {
                        if 
(command.equals("phpt_named")||command.equals("phptnamed")||command.equals("phptn")||command.equals("pn"))
 {
                                if (!(args.length > args_i+3)) {
                                        System.err.println("User Error: must 
specify build, test-pack and name(s) and/or name fragment(s)");
-                                       System.out.println("usage: pftt 
phpt_named <path to PHP build> <path to PHPT test-pack> <test case names or 
name fragments>");
+                                       System.out.println("usage: pftt 
phpt_named <path to PHP build> <path to PHPT test-pack> <test case names or 
name fragments (separated by spaces)>");
                                        System.exit(-255);
                                        return;
                                }
@@ -827,7 +825,7 @@ public class PfttMain {
                                        System.exit(-255);
                                        return;
                                }                               
-                               args_i += 2; // skip over build and test_pack
+                               args_i += 3; // skip over build and test_pack
                                
                                checkUAC(is_uac, false, config, cm);
                                
diff --git a/src/com/mostc/pftt/model/core/EAcceleratorType.java 
b/src/com/mostc/pftt/model/core/EAcceleratorType.java
index b7a2fcd..7485d11 100644
--- a/src/com/mostc/pftt/model/core/EAcceleratorType.java
+++ b/src/com/mostc/pftt/model/core/EAcceleratorType.java
@@ -20,6 +20,12 @@ public enum EAcceleratorType {
                public AbstractCodeCacheScenario getCodeCacheScenario() {
                        return AbstractCodeCacheScenario.NO;
                }
+       },
+       ZEND_OPTIMIZER_PLUS {
+               @Override
+               public AbstractCodeCacheScenario getCodeCacheScenario() {
+                       return AbstractCodeCacheScenario.ZEND_OPTIMIZER_PLUS;
+               }
        };
        
        public abstract AbstractCodeCacheScenario getCodeCacheScenario();
diff --git a/src/com/mostc/pftt/model/core/PhptSourceTestPack.java 
b/src/com/mostc/pftt/model/core/PhptSourceTestPack.java
index 14c50a0..104a4f6 100644
--- a/src/com/mostc/pftt/model/core/PhptSourceTestPack.java
+++ b/src/com/mostc/pftt/model/core/PhptSourceTestPack.java
@@ -98,6 +98,7 @@ public class PhptSourceTestPack implements 
SourceTestPack<PhptActiveTestPack, Ph
                
                LinkedList<PhptTestCase> redirect_targets = new 
LinkedList<PhptTestCase>();
                
+               // (some) names may be exact names of tests, check for those 
first
                Iterator<String> name_it = names.iterator();
                String name;
                File file;
@@ -157,12 +158,16 @@ public class PhptSourceTestPack implements 
SourceTestPack<PhptActiveTestPack, Ph
                for ( File f : files ) {
                        if 
(f.getName().toLowerCase().endsWith(PhptTestCase.PHPT_FILE_EXTENSION)) {
                                if (names!=null) {
+                                       boolean match = false;
                                        for(String name: names) {
-                                               if 
(f.getName().toLowerCase().contains(name))
+                                               if 
(f.getName().toLowerCase().contains(name)) {
+                                                       match = true;
                                                        break;
+                                               }
                                        }
                                        // test doesn't match any name, ignore 
it
-                                       continue main_loop;
+                                       if (!match)
+                                               continue main_loop;
                                }
                                        
                                String test_name = 
f.getAbsolutePath().substring(test_pack.length());
diff --git a/src/com/mostc/pftt/model/core/PhptTestCase.java 
b/src/com/mostc/pftt/model/core/PhptTestCase.java
index d377e6e..f4cdfdd 100644
--- a/src/com/mostc/pftt/model/core/PhptTestCase.java
+++ b/src/com/mostc/pftt/model/core/PhptTestCase.java
@@ -52,7 +52,10 @@ import com.mostc.pftt.util.apache.regexp.REProgram;
  */
 
 public class PhptTestCase extends TestCase {
-       /** extensions (& name fragments) that have non-thread-safe tests (only 
1 test of an NTS extension will be run at a time) processed in order*/
+       /** extensions (& name fragments) that have non-thread-safe tests (only 
1 test of an NTS extension will be run at a time) processed in order
+        * 
+        * Reminder: if -no-nts console option is used, this list is ignored 
(that option allows tests to be run on any thread regardless of thread-safety)
+        * */
        public static final String[][] NON_THREAD_SAFE_EXTENSIONS = new 
String[][]{
                        // split up the ext/standard/tests/file PHPTs
                        // they can be run in 1 thread, but split them into 
several threads so they'll all finish faster
diff --git 
a/src/com/mostc/pftt/model/sapi/AbstractManagedProcessesWebServerManager.java 
b/src/com/mostc/pftt/model/sapi/AbstractManagedProcessesWebServerManager.java
index 68edaaa..841b0b0 100644
--- 
a/src/com/mostc/pftt/model/sapi/AbstractManagedProcessesWebServerManager.java
+++ 
b/src/com/mostc/pftt/model/sapi/AbstractManagedProcessesWebServerManager.java
@@ -126,8 +126,13 @@ public abstract class 
AbstractManagedProcessesWebServerManager extends WebServer
                                //
                                //
                                // if -windebug console option, run web server 
with windebug
-                               if (cm.isWinDebug() && host.isWindows() && 
handle instanceof LocalHost.LocalExecHandle)
+                               if (cm.isWinDebug() && host.isWindows() && 
handle instanceof LocalHost.LocalExecHandle) {
+                                       // TODO -windebug_list
+                                       if 
(server_name!=null&&server_name.toString().contains("bug61115-2")) {
+                                       
                                        web.debug_handle = 
dbg_mgr.newDebugger(cm, host, server_name, build, (LocalHost.LocalExecHandle) 
handle);
+                                       }
+                               }
                                //
                                
                                web.setProcess(handle);
@@ -170,11 +175,11 @@ public abstract class 
AbstractManagedProcessesWebServerManager extends WebServer
                
                // return this failure message to client code
                return new CrashedWebServerInstance(this, ini, env, 
sapi_output);
-       } // end protected synchronized WebServerInstance 
createWebServerInstance
+       } // end protected WebServerInstance createWebServerInstance
        
        protected abstract ManagedProcessWebServerInstance 
createManagedProcessWebServerInstance(ConsoleManager cm, AHost host, PhpBuild 
build, PhpIni ini, Map<String, String> env, String docroot, String 
listen_address, int port);
        
-       public static abstract class ManagedProcessWebServerInstance extends 
WebServerInstance {
+       public abstract class ManagedProcessWebServerInstance extends 
WebServerInstance {
                protected Debugger debug_handle;
                protected final int port;
                protected final String hostname, cmd;
@@ -217,13 +222,16 @@ public abstract class 
AbstractManagedProcessesWebServerManager extends WebServer
 
                @Override
                protected void do_close() {
-                       if (isCrashed() && this.debug_handle!=null)
+                       timer.schedule(new TimerTask() {
+                               public void run() {
+                       if (isCrashed() && debug_handle!=null)
                                // leave process running so it can be debugged
                                return;
-                       if (this.debug_handle!=null)
-                               this.debug_handle.close();
+                       if (debug_handle!=null)
+                               debug_handle.close();
                        
                        process.close();
+                               }}, 5000);
                }
 
                @Override
diff --git a/src/com/mostc/pftt/model/sapi/ApacheManager.java 
b/src/com/mostc/pftt/model/sapi/ApacheManager.java
index 4a22689..914a08e 100644
--- a/src/com/mostc/pftt/model/sapi/ApacheManager.java
+++ b/src/com/mostc/pftt/model/sapi/ApacheManager.java
@@ -164,7 +164,7 @@ public class ApacheManager extends 
AbstractManagedProcessesWebServerManager {
                        //            to run php+phpt so they pass on CLI, but 
too small for apache+php+phpt so they crash on apache)
                        // NOTE: this returns false (no exception) if visual 
studio not installed
                        // NOTE: this returns false (no exception) if apache 
binary can't be edited (already running, UAC privileges not elevated)
-                       if 
(host!=this.cache_host||this.cache_httpd==null||this.cache_httpd.equals(httpd)) 
{
+                       /* TODO if 
(host!=this.cache_host||this.cache_httpd==null||this.cache_httpd.equals(httpd)) 
{
                                // do this once
                                synchronized(host) {
                                        VisualStudioUtil.setExeStackSize(cm, 
host, httpd, VisualStudioUtil.SIXTEEN_MEGABYTES);
@@ -178,7 +178,7 @@ public class ApacheManager extends 
AbstractManagedProcessesWebServerManager {
                                        this.cache_host = host;
                                        this.cache_httpd = httpd;
                                }
-                       }
+                       }*/
                } else {
                        dll = "modules/mod_php.so";
                }
@@ -451,5 +451,10 @@ public class ApacheManager extends 
AbstractManagedProcessesWebServerManager {
                
                return host.isWindows() ? 
apache_version==EApacheVersion.APACHE_2_2 ? host.getSystemDrive() + 
"\\Apache2\\htdocs" : host.getSystemDrive() + "\\Apache24\\htdocs" : 
"/var/www/localhost/htdocs";
        }
+
+       @Override
+       public String getNameWithVersionInfo() {
+               return "Apache-2.4"; // TODO
+       }
        
 } // end public class ApacheManager
diff --git a/src/com/mostc/pftt/model/sapi/BuiltinWebServerManager.java 
b/src/com/mostc/pftt/model/sapi/BuiltinWebServerManager.java
index 0bb4448..8f70175 100644
--- a/src/com/mostc/pftt/model/sapi/BuiltinWebServerManager.java
+++ b/src/com/mostc/pftt/model/sapi/BuiltinWebServerManager.java
@@ -36,7 +36,7 @@ public class BuiltinWebServerManager extends 
AbstractManagedProcessesWebServerMa
                return new BuiltinWebServerInstance(this, host, build, 
build.getPhpExe()+" -S "+listen_address+":"+port+" 
"+(ini==null?"":ini.toCliArgString(host)), ini, env, listen_address, port);
        }
        
-       public static class BuiltinWebServerInstance extends 
ManagedProcessWebServerInstance {
+       public class BuiltinWebServerInstance extends 
ManagedProcessWebServerInstance {
                protected final PhpBuild build;
                protected final AHost host;
                
@@ -90,4 +90,9 @@ public class BuiltinWebServerManager extends 
AbstractManagedProcessesWebServerMa
                return build.getBuildPath();
        }
 
+       @Override
+       public String getNameWithVersionInfo() {
+               return getName();
+       }
+
 } // end public class BuiltinWebServerManager
diff --git a/src/com/mostc/pftt/model/sapi/IISManager.java 
b/src/com/mostc/pftt/model/sapi/IISManager.java
index 2a81fd9..1739ee7 100644
--- a/src/com/mostc/pftt/model/sapi/IISManager.java
+++ b/src/com/mostc/pftt/model/sapi/IISManager.java
@@ -304,4 +304,9 @@ public class IISManager extends WebServerManager {
                return host.getSystemDrive() + "\\inetpub\\wwwroot";
        }
 
+       @Override
+       public String getNameWithVersionInfo() {
+               return "IIS";
+       }
+
 } // end public class IISManager
diff --git a/src/com/mostc/pftt/model/sapi/WebServerManager.java 
b/src/com/mostc/pftt/model/sapi/WebServerManager.java
index 53f43ab..9ab40cf 100644
--- a/src/com/mostc/pftt/model/sapi/WebServerManager.java
+++ b/src/com/mostc/pftt/model/sapi/WebServerManager.java
@@ -2,7 +2,7 @@ package com.mostc.pftt.model.sapi;
 
 import java.io.IOException;
 import java.net.Socket;
-import java.util.LinkedList;
+import java.util.ArrayList;
 import java.util.Map;
 
 import javax.annotation.concurrent.ThreadSafe;
@@ -23,10 +23,10 @@ import com.mostc.pftt.results.ConsoleManager;
 public abstract class WebServerManager extends SAPIManager {
        public static final String LOCALHOST = "localhost";
        //
-       protected final LinkedList<WebServerInstance> instances;
+       protected final ArrayList<WebServerInstance> instances;
        
        public WebServerManager() {
-               instances = new LinkedList<WebServerInstance>();
+               instances = new ArrayList<WebServerInstance>(100);
        }
        
        /** sets up the web server
@@ -145,5 +145,7 @@ public abstract class WebServerManager extends SAPIManager {
                        return false;
                }
        }
+
+       public abstract String getNameWithVersionInfo();
        
 } // end public abstract class WebServerManager
diff --git a/src/com/mostc/pftt/report/FBCReportGen.groovy 
b/src/com/mostc/pftt/report/FBCReportGen.groovy
index 3bad363..c683040 100644
--- a/src/com/mostc/pftt/report/FBCReportGen.groovy
+++ b/src/com/mostc/pftt/report/FBCReportGen.groovy
@@ -9,6 +9,7 @@ import com.mostc.pftt.model.core.EBuildBranch;
 import com.mostc.pftt.results.PhptTestResult;
 import com.mostc.pftt.results.PhpResultPack;
 
+// XXX including warning if -no-nts console option was used
 class FBCReportGen extends AbstractReportGen {
        final PhpResultPack base_telem, test_telem;
        int row = 1;
diff --git a/src/com/mostc/pftt/results/ConsoleManager.java 
b/src/com/mostc/pftt/results/ConsoleManager.java
index d0fae55..aaceb70 100644
--- a/src/com/mostc/pftt/results/ConsoleManager.java
+++ b/src/com/mostc/pftt/results/ConsoleManager.java
@@ -24,7 +24,8 @@ public interface ConsoleManager {
                CANT_CONTINUE,
                IN_PROGRESS,
                COMPLETED_OPERATION,
-               OPERATION_FAILED_CONTINUING
+               OPERATION_FAILED_CONTINUING,
+               TIP
        }
        public void println(EPrintType type, Class<?> clazz, String string);
        public void addGlobalException(EPrintType type, Class<?> clazz, String 
method_name, Exception ex, String msg);
diff --git a/src/com/mostc/pftt/results/LocalConsoleManager.java 
b/src/com/mostc/pftt/results/LocalConsoleManager.java
index b86c57a..48c7525 100644
--- a/src/com/mostc/pftt/results/LocalConsoleManager.java
+++ b/src/com/mostc/pftt/results/LocalConsoleManager.java
@@ -107,6 +107,9 @@ public class LocalConsoleManager implements ConsoleManager {
                case CLUE:
                        System.out.println(type+": "+ctx_str+": "+string);
                        break;
+               case TIP:
+                       System.out.println("PFTT: "+string);
+                       break;
                default:
                        System.out.println("PFTT: "+ctx_str+": "+string);
                }
diff --git a/src/com/mostc/pftt/results/PhpResultPackWriter.java 
b/src/com/mostc/pftt/results/PhpResultPackWriter.java
index b7b494c..875fe14 100644
--- a/src/com/mostc/pftt/results/PhpResultPackWriter.java
+++ b/src/com/mostc/pftt/results/PhpResultPackWriter.java
@@ -39,6 +39,8 @@ import com.mostc.pftt.util.ErrorUtil;
  *
  */
  
+//TODO log cli args to result-pack
+//-warn if -no-nts is used
 // TODO store consolemanager logs in result-pack
 //   -including smoke checks from dfs and deduplication scenrios
 public class PhpResultPackWriter extends PhpResultPack implements 
ITestResultReceiver {
diff --git a/src/com/mostc/pftt/runner/AbstractLocalTestPackRunner.java 
b/src/com/mostc/pftt/runner/AbstractLocalTestPackRunner.java
index ff18c41..fc19d9a 100644
--- a/src/com/mostc/pftt/runner/AbstractLocalTestPackRunner.java
+++ b/src/com/mostc/pftt/runner/AbstractLocalTestPackRunner.java
@@ -20,6 +20,9 @@ import com.mostc.pftt.model.ActiveTestPack;
 import com.mostc.pftt.model.SourceTestPack;
 import com.mostc.pftt.model.TestCase;
 import com.mostc.pftt.model.core.PhpBuild;
+import com.mostc.pftt.model.core.PhpIni;
+import com.mostc.pftt.model.core.PhptTestCase;
+import com.mostc.pftt.model.sapi.ApacheManager;
 import com.mostc.pftt.model.sapi.SAPIInstance;
 import com.mostc.pftt.model.sapi.SharedSAPIInstanceTestCaseGroupKey;
 import com.mostc.pftt.model.sapi.TestCaseGroupKey;
@@ -36,6 +39,7 @@ import com.mostc.pftt.scenario.Scenario;
 import com.mostc.pftt.scenario.ScenarioSet;
 import com.mostc.pftt.scenario.AbstractFileSystemScenario.ITestPackStorageDir;
 
+// TODO both -run_group_times and -run_test_times
 public abstract class AbstractLocalTestPackRunner<A extends ActiveTestPack, S 
extends SourceTestPack<A,T>, T extends TestCase> extends 
AbstractTestPackRunner<S, T> {
        protected static final int MAX_THREAD_COUNT = 64;
        protected S src_test_pack;
@@ -71,6 +75,12 @@ public abstract class AbstractLocalTestPackRunner<A extends 
ActiveTestPack, S ex
                        this.group_key = group_key;
                        test_cases = new LinkedBlockingQueue<T>();
                }
+               
+               public TestCaseGroup<T> clone() {
+                       TestCaseGroup<T> c = new 
TestCaseGroup<T>(this.group_key);
+                       c.test_cases.addAll(this.test_cases);
+                       return c;
+               }
        }
        
        public AbstractLocalTestPackRunner(ConsoleManager cm, 
ITestResultReceiver twriter, ScenarioSet scenario_set, PhpBuild build, AHost 
host) {
@@ -100,6 +110,12 @@ public abstract class AbstractLocalTestPackRunner<A 
extends ActiveTestPack, S ex
        }
        
        protected void runTestList(S test_pack, A active_test_pack, List<T> 
test_cases) throws Exception {
+               if (test_cases.isEmpty()) {
+                       if (cm!=null)
+                               cm.println(EPrintType.COMPLETED_OPERATION, 
getClass(), "no test cases to run. did nothing.");
+                       return;
+               }
+               
                // if already running, wait
                while (runner_state.get()==ETestPackRunnerState.RUNNING) {
                        Thread.sleep(100);
@@ -207,7 +223,8 @@ public abstract class AbstractLocalTestPackRunner<A extends 
ActiveTestPack, S ex
                
                for (T test_case : test_cases) {
                        try {
-                               group_key = createGroupKey(test_case, 
group_key);
+                               if (group_key==null) // TODO share 1 key
+                                       group_key = createGroupKey(test_case, 
group_key);
                                
                                if (group_key==null)
                                        continue;
@@ -217,33 +234,39 @@ public abstract class AbstractLocalTestPackRunner<A 
extends ActiveTestPack, S ex
                                continue;
                        }
                        
-                       if (!handleNTS(group_key, test_case)) {
+                       // TODO if (!handleNTS(group_key, test_case)) {
                                // test case is thread-safe
                                handleTS(thread_safe_list, group_key, 
test_case);
-                       }
+                       // TODO }
                        //
                } // end while
                
                //
                postGroup(thread_safe_list, test_cases);
                
-               if (cm.isRandomizeTestOrder()) {
-                       for ( @SuppressWarnings("rawtypes") NonThreadSafeExt 
ext : non_thread_safe_exts ) {
+               if (true) { // TODO cm.isRandomizeTestOrder()) {
+                       /* TODO for ( @SuppressWarnings("rawtypes") 
NonThreadSafeExt ext : non_thread_safe_exts ) {
                                for ( Object group : ext.test_groups ) 
                                        randomizeGroup((TestCaseGroup<T>) 
group);
-                       }
+                       }*/
                        
                        //
                        for (TestCaseGroup<T> group : thread_safe_list) {
-                               randomizeGroup(group);
+                               //randomizeGroup(group);
                                
-                               thread_safe_groups.add(group);
+                               // TODO
+                               for ( int i=0 ; i < 2000 ; i++) {
+                                       TestCaseGroup<T> c = group.clone();
+                                       
+                                       randomizeGroup(c);
+                                       
+                                       thread_safe_groups.add(c);
+                               }
                        }
                } else {
                        for (TestCaseGroup<T> group : thread_safe_list)
                                thread_safe_groups.add(group);
                }
-               
        } // end protected void groupTestCases
        
        private Random r = new Random();
@@ -293,11 +316,11 @@ public abstract class AbstractLocalTestPackRunner<A 
extends ActiveTestPack, S ex
                </body>
                </html>
 */
-               int thread_count = 2 * 
sapi_scenario.getTestThreadCount(runner_host);
-               if (thread_count > thread_safe_test_count + 
non_thread_safe_exts.size())
-                       thread_count = thread_safe_test_count + 
non_thread_safe_exts.size();
+               int thread_count = 
sapi_scenario.getTestThreadCount(runner_host);
+               /* TODO if (thread_count > thread_safe_test_count + 
non_thread_safe_exts.size())
+                       thread_count = thread_safe_test_count + 
non_thread_safe_exts.size(); 
                if (thread_count > MAX_THREAD_COUNT)
-                       thread_count = MAX_THREAD_COUNT;
+                       thread_count = MAX_THREAD_COUNT;*/
                if (cm.isWinDebug()) {
                        // run fewer threads b/c we're running WinDebug
                        // (can run WinDebug w/ same number of threads, but UI 
responsiveness will be SLoow)
@@ -310,7 +333,11 @@ public abstract class AbstractLocalTestPackRunner<A 
extends ActiveTestPack, S ex
                
                for ( int i=0 ; i < thread_count ; i++ ) { 
                        start_thread(parallel);
+
+                       
+                       
                }
+               //Thread.sleep(1000000);
                
                // wait until done
                int c ; while ( ( c = active_thread_count.get() ) > 0 ) { 
Thread.sleep(c>3?1000:50); }
@@ -320,15 +347,25 @@ public abstract class AbstractLocalTestPackRunner<A 
extends ActiveTestPack, S ex
                TestPackThread<T> t = createTestPackThread(parallel);
                // if running Swing UI, run thread minimum priority in favor of 
Swing EDT
                t.setPriority(Thread.MIN_PRIORITY);
+               /*Runnable r = new Runnable() {
+                       public void run() {
+                               a.getWebServerInstance(cm, runner_host, build, 
new PhpIni(), null, "C:\\", null, Thread.currentThread().getName());
+                       }
+               };
+               Thread t = new Thread(r);*/
+               t.setDaemon(true);
                t.start();
+               //t.run();
+               //*/
+               //a.getWebServerInstance(cm, runner_host, build, new PhpIni(), 
null, "C:\\", null, Thread.currentThread().getName());
        }
        
        protected abstract TestPackThread<T> createTestPackThread(boolean 
parallel);
-       
+       ApacheManager a = new ApacheManager(); // TODO
        public abstract class TestPackThread<t extends T> extends 
SlowReplacementTestPackRunnerThread {
                protected final AtomicBoolean run_thread;
                protected final boolean parallel;
-               protected final int run_test_times;
+               protected int run_test_times; // TODO final?
                
                protected TestPackThread(boolean parallel) {
                        this.run_thread = new AtomicBoolean(true);
@@ -339,16 +376,25 @@ public abstract class AbstractLocalTestPackRunner<A 
extends ActiveTestPack, S ex
                                
                @Override
                public void run() {
+                       /*
+                       a.getWebServerInstance(cm, runner_host, build, new 
PhpIni(), null, "C:\\", null, Thread.currentThread().getName());
+                       
+                       if (true)
+                               return;
+                       */
+                       
                        // pick a non-thread-safe(NTS) extension that isn't 
already running then run it
                        //
                        // keep doing that until they're all done, then execute 
all the thread-safe tests
                        // (if there aren't enough NTS extensions to fill all 
the threads, some threads will only execute thread-safe tests)
                        //
                        try {
+                               //while(true) {// TODO
                                runNonThreadSafe(); 
                                
                                // execute any remaining thread safe jobs
                                runThreadSafe();
+                               //}
                        } catch ( Exception ex ) {
                                cm.addGlobalException(EPrintType.CANT_CONTINUE, 
getClass(), "run", ex, "", storage_host, build, scenario_set);
                        } finally {
@@ -389,8 +435,8 @@ public abstract class AbstractLocalTestPackRunner<A extends 
ActiveTestPack, S ex
                                        continue;
                                } else {
                                        exec_jobs(group.group_key, 
group.test_cases, test_count);
-                                       if (group.test_cases.isEmpty())
-                                               
thread_safe_groups.remove(group);
+                                       //if (group.test_cases.isEmpty())
+                                               
//thread_safe_groups.remove(group);
                                }
                        }
                } // end protected void runThreadSafe
@@ -433,14 +479,39 @@ public abstract class AbstractLocalTestPackRunner<A 
extends ActiveTestPack, S ex
                                                }
                                        }
                                        
-                                       for ( int i=0 ; i < run_test_times ; 
i++ ) {
+                                       /*run_test_times = 2;
+                                       if (((PhptTestCase)test_case).isNamed(
+                                                       
"ext/standard/tests/file/bug38450_1.phpt",
+                                                       
"ext/standard/tests/file/stream_supports_lock.phpt",
+                                                       
"ext/zip/tests/oo_namelocate.phpt",
+                                                       
"ext/spl/tests/splfileobject_fputcsv_variation8.phpt",
+                                                       
//"ext/phar/tests/phar_stub_write_file.phpt",
+                                                       
"ext/date/tests/date_default_timezone_get-1-win32.phpt",
+                                                       
"ext/phar/tests/readfile.phpt",
+                                                       
"ext/intl/tests/dateformat_parse.phpt",
+                                                       
"ext/date/tests/date_create_from_format_basic.phpt",
+                                                       
"ext/date/tests/date_default_timezone_get-2.phpt",
+                                                       
"ext/intl/tests/dateformat_set_timezone_id2.phpt",
+                                                       
"ext/standard/tests/network/shutdown.phpt",
+                                                       
//"ext/phar/tests/cache_list/copyonwrite3.phar.phpt",
+                                                       
"ext/standard/tests/strings/fprintf_variation_004.phpt",
+                                                       
"ext/standard/tests/assert/assert_error1.phpt"
+                                                       )) {
+                                               run_test_times = 500;
+                                               // TODO -run_all
+                                               // TODO -run_test_times_list
+                                               // TODO -windebug_all
+                                               // TODO -windebug_list
+                                       }
+                                       */
+                                       //for ( int i=0 ; i < run_test_times ; 
i++ ) {
                                                // CRITICAL: catch exception to 
record with test
                                                try {
                                                        runTest(group_key, 
test_case);
                                                } catch ( Throwable ex ) {
                                                        
twriter.addTestException(storage_host, scenario_set, test_case, ex, sa);
                                                }
-                                       }
+                                       //}
                                        
                                        test_count.incrementAndGet();
                                        Thread.yield();
diff --git a/src/com/mostc/pftt/runner/LocalPhptTestPackRunner.java 
b/src/com/mostc/pftt/runner/LocalPhptTestPackRunner.java
index e28a8de..fd9d201 100644
--- a/src/com/mostc/pftt/runner/LocalPhptTestPackRunner.java
+++ b/src/com/mostc/pftt/runner/LocalPhptTestPackRunner.java
@@ -124,6 +124,8 @@ public class LocalPhptTestPackRunner extends 
AbstractLocalTestPackRunner<PhptAct
        
        @Override
        protected boolean handleNTS(TestCaseGroupKey group_key, PhptTestCase 
test_case) {
+               /* TODO if (no_nts)
+                       return false; */
                for (String[] 
ext_names:PhptTestCase.NON_THREAD_SAFE_EXTENSIONS) {
                        if (StringUtil.startsWithAnyIC(test_case.getName(), 
ext_names)) {
                                NonThreadSafeExt<PhptTestCase> ext = 
non_thread_safe_tests.get(ext_names);
diff --git a/src/com/mostc/pftt/scenario/APCScenario.java 
b/src/com/mostc/pftt/scenario/APCScenario.java
index 5d4cea0..63934d9 100644
--- a/src/com/mostc/pftt/scenario/APCScenario.java
+++ b/src/com/mostc/pftt/scenario/APCScenario.java
@@ -15,6 +15,11 @@ import com.mostc.pftt.results.ConsoleManager;
 public class APCScenario extends AbstractCodeCacheScenario {
 
        @Override
+       public String getNameWithVersionInfo() {
+               return "APC-3.1.13";
+       }
+       
+       @Override
        public String getName() {
                return "APC";
        }
diff --git a/src/com/mostc/pftt/scenario/AbstractCodeCacheScenario.java 
b/src/com/mostc/pftt/scenario/AbstractCodeCacheScenario.java
index 45a357e..cf23e8f 100644
--- a/src/com/mostc/pftt/scenario/AbstractCodeCacheScenario.java
+++ b/src/com/mostc/pftt/scenario/AbstractCodeCacheScenario.java
@@ -3,9 +3,10 @@ package com.mostc.pftt.scenario;
 import com.mostc.pftt.model.core.EAcceleratorType;
 
 public abstract class AbstractCodeCacheScenario extends AbstractINIScenario {
-       public static final AbstractCodeCacheScenario WINCACHE = new 
WinCacheScenario();
-       public static final AbstractCodeCacheScenario NO = new 
NoCodeCacheScenario();
-       public static final AbstractCodeCacheScenario APC = new APCScenario();
+       public static final WinCacheScenario WINCACHE = new WinCacheScenario();
+       public static final NoCodeCacheScenario NO = new NoCodeCacheScenario();
+       public static final APCScenario APC = new APCScenario();
+       public static final ZendOptimizerPlusScenario ZEND_OPTIMIZER_PLUS = new 
ZendOptimizerPlusScenario();
        
        @Override
        public Class<?> getSerialKey() {
diff --git a/src/com/mostc/pftt/scenario/AbstractDatabaseScenario.java 
b/src/com/mostc/pftt/scenario/AbstractDatabaseScenario.java
index 6e45d97..318b2f4 100644
--- a/src/com/mostc/pftt/scenario/AbstractDatabaseScenario.java
+++ b/src/com/mostc/pftt/scenario/AbstractDatabaseScenario.java
@@ -12,7 +12,7 @@ import com.mostc.pftt.results.ConsoleManager;
 *
 */
 
-public abstract class AbstractDatabaseScenario extends 
AbstractParallelScenario {
+public abstract class AbstractDatabaseScenario extends 
AbstractNetworkedServiceScenario {
        
        @Override
        public boolean isUACRequiredForSetup() {
diff --git a/src/com/mostc/pftt/scenario/AbstractNetworkedServiceScenario.java 
b/src/com/mostc/pftt/scenario/AbstractNetworkedServiceScenario.java
index 53c80b8..c642bea 100644
--- a/src/com/mostc/pftt/scenario/AbstractNetworkedServiceScenario.java
+++ b/src/com/mostc/pftt/scenario/AbstractNetworkedServiceScenario.java
@@ -1,5 +1,8 @@
-package com.mostc.pftt.scenario;
-
-public abstract class AbstractNetworkedServiceScenario extends 
AbstractParallelScenario {
-
-}
+package com.mostc.pftt.scenario;
+
+public abstract class AbstractNetworkedServiceScenario extends 
AbstractParallelScenario {
+
+       @Override
+       public abstract String getNameWithVersionInfo();
+       
+}
diff --git a/src/com/mostc/pftt/scenario/AbstractWebServerScenario.java 
b/src/com/mostc/pftt/scenario/AbstractWebServerScenario.java
index 2349afe..3ad33ee 100644
--- a/src/com/mostc/pftt/scenario/AbstractWebServerScenario.java
+++ b/src/com/mostc/pftt/scenario/AbstractWebServerScenario.java
@@ -51,6 +51,11 @@ public abstract class AbstractWebServerScenario extends 
AbstractSAPIScenario {
                return 
scenario_set.getScenario(AbstractWebServerScenario.class, null);
        }
        
+       @Override
+       public String getNameWithVersionInfo() {
+               return smgr.getNameWithVersionInfo();
+       }
+       
        protected final HttpParams params;
        protected final HttpProcessor httpproc;
        protected final HttpRequestExecutor httpexecutor;
diff --git a/src/com/mostc/pftt/scenario/FTPScenario.java 
b/src/com/mostc/pftt/scenario/FTPScenario.java
index 9b97183..cdba7cc 100644
--- a/src/com/mostc/pftt/scenario/FTPScenario.java
+++ b/src/com/mostc/pftt/scenario/FTPScenario.java
@@ -18,4 +18,9 @@ public class FTPScenario extends AbstractStreamsScenario {
                return false;
        }
 
+       @Override
+       public String getNameWithVersionInfo() {
+               return "FTP"; // XXX -[ftp server implementation and server 
version]
+       }
+
 }
diff --git a/src/com/mostc/pftt/scenario/HTTPScenario.java 
b/src/com/mostc/pftt/scenario/HTTPScenario.java
index 47041ac..87edd90 100644
--- a/src/com/mostc/pftt/scenario/HTTPScenario.java
+++ b/src/com/mostc/pftt/scenario/HTTPScenario.java
@@ -18,4 +18,9 @@ public class HTTPScenario extends AbstractStreamsScenario {
                return false;
        }
 
+       @Override
+       public String getNameWithVersionInfo() {
+               return "HTTP"; // XXX -[server implementation and server 
version]
+       }
+
 }
diff --git a/src/com/mostc/pftt/scenario/IMAPScenario.java 
b/src/com/mostc/pftt/scenario/IMAPScenario.java
index f4049d4..0296a13 100644
--- a/src/com/mostc/pftt/scenario/IMAPScenario.java
+++ b/src/com/mostc/pftt/scenario/IMAPScenario.java
@@ -1,21 +1,26 @@
-package com.mostc.pftt.scenario;
-
-/** scenario for interacting with IMAP mail servers
- * 
- * @author Matt Ficken
- *
- */
-
-public class IMAPScenario extends AbstractNetworkedServiceScenario {
-
-       @Override
-       public String getName() {
-               return "IMAP";
-       }
-
-       @Override
-       public boolean isImplemented() {
-               return false;
-       }
-
-}
+package com.mostc.pftt.scenario;
+
+/** scenario for interacting with IMAP mail servers
+ * 
+ * @author Matt Ficken
+ *
+ */
+
+public class IMAPScenario extends AbstractNetworkedServiceScenario {
+
+       @Override
+       public String getName() {
+               return "IMAP";
+       }
+
+       @Override
+       public boolean isImplemented() {
+               return false;
+       }
+
+       @Override
+       public String getNameWithVersionInfo() {
+               return "IMAP"; // XXX -[server implementation and server 
version]
+       }
+
+}
diff --git a/src/com/mostc/pftt/scenario/LDAPScenario.java 
b/src/com/mostc/pftt/scenario/LDAPScenario.java
index f2bfca3..00d07f8 100644
--- a/src/com/mostc/pftt/scenario/LDAPScenario.java
+++ b/src/com/mostc/pftt/scenario/LDAPScenario.java
@@ -1,19 +1,24 @@
-package com.mostc.pftt.scenario;
-
-/** LDAP
- *
- */
-
-public class LDAPScenario extends AbstractNetworkedServiceScenario {
-
-       @Override
-       public String getName() {
-               return "LDAP";
-       }
-
-       @Override
-       public boolean isImplemented() {
-               return false;
-       }
-
-}
+package com.mostc.pftt.scenario;
+
+/** LDAP
+ *
+ */
+
+public class LDAPScenario extends AbstractNetworkedServiceScenario {
+
+       @Override
+       public String getName() {
+               return "LDAP";
+       }
+
+       @Override
+       public boolean isImplemented() {
+               return false;
+       }
+
+       @Override
+       public String getNameWithVersionInfo() {
+               return "LDAP"; // XXX -[server implementation and server 
version]
+       }
+
+}
diff --git a/src/com/mostc/pftt/scenario/MSAccessScenario.java 
b/src/com/mostc/pftt/scenario/MSAccessScenario.java
index 3333615..0b40410 100644
--- a/src/com/mostc/pftt/scenario/MSAccessScenario.java
+++ b/src/com/mostc/pftt/scenario/MSAccessScenario.java
@@ -57,4 +57,9 @@ public class MSAccessScenario extends AbstractODBCScenario {
                AbstractPhpUnitTestCaseRunner.addDatabaseConnection(dsn, 
username, password, database, globals);
        }
 
+       @Override
+       public String getNameWithVersionInfo() {
+               return "ODBC-Access"; // XXX -[server implementation and server 
version]
+       }
+
 }
diff --git a/src/com/mostc/pftt/scenario/MSSQLODBCScenario.java 
b/src/com/mostc/pftt/scenario/MSSQLODBCScenario.java
index 7f7ef7d..6af6e3a 100644
--- a/src/com/mostc/pftt/scenario/MSSQLODBCScenario.java
+++ b/src/com/mostc/pftt/scenario/MSSQLODBCScenario.java
@@ -66,4 +66,9 @@ public class MSSQLODBCScenario extends AbstractODBCScenario {
                AbstractPhpUnitTestCaseRunner.addDatabaseConnection(dsn, 
username, password, database, globals);
        }
 
+       @Override
+       public String getNameWithVersionInfo() {
+               return "ODBC-MSSQL"; // XXX -[server implementation and server 
version]
+       }
+
 } // end public class MSSQLODBCScenario
diff --git a/src/com/mostc/pftt/scenario/MSSQLScenario.java 
b/src/com/mostc/pftt/scenario/MSSQLScenario.java
index aa5383e..3fe4282 100644
--- a/src/com/mostc/pftt/scenario/MSSQLScenario.java
+++ b/src/com/mostc/pftt/scenario/MSSQLScenario.java
@@ -59,4 +59,9 @@ public class MSSQLScenario extends AbstractDatabaseScenario {
                AbstractPhpUnitTestCaseRunner.addDatabaseConnection(dsn, 
username, password, database, globals);
        }
 
+       @Override
+       public String getNameWithVersionInfo() {
+               return "MSSQL"; // XXX -[server implementation and server 
version]
+       }
+
 } // end public class MSSQLScenario
diff --git a/src/com/mostc/pftt/scenario/MySQLScenario.java 
b/src/com/mostc/pftt/scenario/MySQLScenario.java
index 4d12379..76b8fc7 100644
--- a/src/com/mostc/pftt/scenario/MySQLScenario.java
+++ b/src/com/mostc/pftt/scenario/MySQLScenario.java
@@ -104,5 +104,9 @@ public class MySQLScenario extends AbstractDatabaseScenario 
{
        @Override
        public void setGlobals(Map<String, String> globals) {
                AbstractPhpUnitTestCaseRunner.addDatabaseConnection(dsn, 
username, password, database, globals);
+       }
+       @Override
+       public String getNameWithVersionInfo() {
+               return "MySQL"; // XXX -[server implementation and server 
version]
        }       
 } // end class MySQLScenario
\ No newline at end of file
diff --git a/src/com/mostc/pftt/scenario/PostgresSQLScenario.java 
b/src/com/mostc/pftt/scenario/PostgresSQLScenario.java
index 56ef450..247a92a 100644
--- a/src/com/mostc/pftt/scenario/PostgresSQLScenario.java
+++ b/src/com/mostc/pftt/scenario/PostgresSQLScenario.java
@@ -54,4 +54,9 @@ public class PostgresSQLScenario extends 
AbstractDatabaseScenario {
                AbstractPhpUnitTestCaseRunner.addDatabaseConnection(dsn, 
username, password, database, globals);
        }
 
+       @Override
+       public String getNameWithVersionInfo() {
+               return "PostgresSQL"; // XXX -[server implementation and server 
version]
+       }
+
 } // end public class PostgresSQLScenario
diff --git a/src/com/mostc/pftt/scenario/SOAPScenario.java 
b/src/com/mostc/pftt/scenario/SOAPScenario.java
index 577fe09..440a558 100644
--- a/src/com/mostc/pftt/scenario/SOAPScenario.java
+++ b/src/com/mostc/pftt/scenario/SOAPScenario.java
@@ -18,4 +18,9 @@ public class SOAPScenario extends 
AbstractNetworkedServiceScenario {
                return false;
        }
 
+       @Override
+       public String getNameWithVersionInfo() {
+               return "SOAP"; // XXX -[server implementation and server 
version]
+       }
+
 }
diff --git a/src/com/mostc/pftt/scenario/SQLite3Scenario.java 
b/src/com/mostc/pftt/scenario/SQLite3Scenario.java
index 0a4dc8d..a3a1d67 100644
--- a/src/com/mostc/pftt/scenario/SQLite3Scenario.java
+++ b/src/com/mostc/pftt/scenario/SQLite3Scenario.java
@@ -54,4 +54,9 @@ public class SQLite3Scenario extends AbstractDatabaseScenario 
{
                AbstractPhpUnitTestCaseRunner.addDatabaseConnection(dsn, 
username, password, database, globals);
        }
 
+       @Override
+       public String getNameWithVersionInfo() {
+               return "SQLite3"; // XXX -[server implementation and server 
version]
+       }
+
 }
diff --git a/src/com/mostc/pftt/scenario/Scenario.java 
b/src/com/mostc/pftt/scenario/Scenario.java
index 68cbe64..04bc3ba 100644
--- a/src/com/mostc/pftt/scenario/Scenario.java
+++ b/src/com/mostc/pftt/scenario/Scenario.java
@@ -50,6 +50,14 @@ public abstract class Scenario {
        public abstract String getName();
        public abstract boolean isImplemented();
        
+       /**
+        * 
+        * @return
+        */
+       public String getNameWithVersionInfo() {
+               return getName();
+       }
+       
        /** @see ScenarioSet#getENV
         * 
         * @param env
diff --git a/src/com/mostc/pftt/scenario/ScenarioSet.java 
b/src/com/mostc/pftt/scenario/ScenarioSet.java
index 30e3846..ea90951 100644
--- a/src/com/mostc/pftt/scenario/ScenarioSet.java
+++ b/src/com/mostc/pftt/scenario/ScenarioSet.java
@@ -70,7 +70,7 @@ public class ScenarioSet extends ArrayList<Scenario> {
                                continue;
                        else if (sb.length()>0)
                                sb.append('_');
-                       str = s.toString();
+                       str = s.getName();
                        sb.append(str);
                }
                this.str = sb.toString();
@@ -93,7 +93,33 @@ public class ScenarioSet extends ArrayList<Scenario> {
                return getName();
        }
        
+       /** returns this ScenarioSet's name and important version info (mainly 
just for reports)
+        * 
+        * @see #getName - normally, use getName, its shorter. 
+        * @return
+        */
+       public String getNameWithVersionInfo() {
+               StringBuilder sb = new StringBuilder(50);
+               String str;
+               for ( Scenario s : this ) {
+                       if (s.isPlaceholder())
+                               continue;
+                       else if (sb.length()>0)
+                               sb.append('_');
+                       str = s.getNameWithVersionInfo();
+                       sb.append(str);
+               }
+               return sb.toString();
+       }
+       
+       /** returns the name of this ScenarioSet (the names of the contained 
Scenarios) as a String
+        * 
+        * @see #getNameWithVersionInfo - returns a longer string with version 
info, etc...
+        * @return
+        */
        public String getName() {
+               // used by #toString, so this has to be fast
+               // whereas #getNameWithVersionInfo isn't used much
                ensureSorted();
                return str; // @see #sort
        }
@@ -298,6 +324,11 @@ public class ScenarioSet extends ArrayList<Scenario> {
                scenario_sets = 
permuteScenarioSets(Arrays.asList(Scenario.getAllDefaultScenarios()));
        }
        
+       /** ensures ScenarioSet has a FileSystem and SAPIScenario by adding the 
default filesystem (local) or
+        * default SAPIScenario (cli) if needed.
+        * 
+        * @param scenario_set
+        */
        public static void ensureSetHasFileSystemAndSAPI(ScenarioSet 
scenario_set) {
                boolean match = false;
                for ( Scenario scenario : scenario_set ) {
diff --git a/src/com/mostc/pftt/scenario/WinCacheScenario.java 
b/src/com/mostc/pftt/scenario/WinCacheScenario.java
index 14d1a93..4f05ac4 100644
--- a/src/com/mostc/pftt/scenario/WinCacheScenario.java
+++ b/src/com/mostc/pftt/scenario/WinCacheScenario.java
@@ -15,6 +15,11 @@ import com.mostc.pftt.results.ConsoleManager;
 public class WinCacheScenario extends AbstractCodeCacheScenario {
 
        @Override
+       public String getNameWithVersionInfo() {
+               return "WinCache"; // XXX version
+       }
+       
+       @Override
        public String getName() {
                return "WinCache";
        }
diff --git a/src/com/mostc/pftt/scenario/XMLRPCScenario.java 
b/src/com/mostc/pftt/scenario/XMLRPCScenario.java
index 1947be9..1721aa1 100644
--- a/src/com/mostc/pftt/scenario/XMLRPCScenario.java
+++ b/src/com/mostc/pftt/scenario/XMLRPCScenario.java
@@ -18,4 +18,9 @@ public class XMLRPCScenario extends 
AbstractNetworkedServiceScenario {
                return false;
        }
 
+       @Override
+       public String getNameWithVersionInfo() {
+               return "XMLRPC"; // XXX -[server implementation and server 
version]
+       }
+
 }
diff --git a/src/com/mostc/pftt/scenario/ZendOptimizerPlusScenario.java 
b/src/com/mostc/pftt/scenario/ZendOptimizerPlusScenario.java
new file mode 100644
index 0000000..fd8f986
--- /dev/null
+++ b/src/com/mostc/pftt/scenario/ZendOptimizerPlusScenario.java
@@ -0,0 +1,37 @@
+package com.mostc.pftt.scenario;
+
+import com.mostc.pftt.host.Host;
+import com.mostc.pftt.model.core.EAcceleratorType;
+import com.mostc.pftt.model.core.PhpBuild;
+import com.mostc.pftt.model.core.PhpIni;
+import com.mostc.pftt.results.ConsoleManager;
+
+public class ZendOptimizerPlusScenario extends AbstractCodeCacheScenario {
+
+       @Override
+       public String getNameWithVersionInfo() {
+               return "ZendOptimizer+"; // XXX version
+       }
+
+       @Override
+       public EAcceleratorType getAcceleratorType() {
+               return EAcceleratorType.ZEND_OPTIMIZER_PLUS;
+       }
+
+       @Override
+       public boolean setup(ConsoleManager cm, Host host, PhpBuild build, 
PhpIni ini) {
+               // TODO Auto-generated method stub
+               return false;
+       }
+
+       @Override
+       public String getName() {
+               return "ZendOptimizer+";
+       }
+
+       @Override
+       public boolean isImplemented() {
+               return false;
+       }
+       
+}
diff --git a/src/com/mostc/pftt/util/HostEnvUtil.java 
b/src/com/mostc/pftt/util/HostEnvUtil.java
index 2ee87a7..9d1d931 100644
--- a/src/com/mostc/pftt/util/HostEnvUtil.java
+++ b/src/com/mostc/pftt/util/HostEnvUtil.java
@@ -6,7 +6,6 @@ import com.github.mattficken.io.StringUtil;
 import com.mostc.pftt.host.ExecOutput;
 import com.mostc.pftt.host.AHost;
 import com.mostc.pftt.host.LocalHost;
-import com.mostc.pftt.model.core.EBuildBranch;
 import com.mostc.pftt.model.core.PhpBuild;
 import com.mostc.pftt.results.ConsoleManager;
 import com.mostc.pftt.results.ConsoleManager.EPrintType;
diff --git a/src/com/mostc/pftt/util/WinDebugManager.java 
b/src/com/mostc/pftt/util/WinDebugManager.java
index 048b5bb..af85afc 100644
--- a/src/com/mostc/pftt/util/WinDebugManager.java
+++ b/src/com/mostc/pftt/util/WinDebugManager.java
@@ -24,6 +24,7 @@ import com.mostc.pftt.results.ConsoleManager.EPrintType;
 public class WinDebugManager extends DebuggerManager {
        private String win_dbg_exe;
        private AHost win_dbg_host;
+       private boolean displayed_windbg_tips = false;
        
        protected void ensureFindWinDbgExe(ConsoleManager cm, AHost host) {
                if (this.win_dbg_host==host)
@@ -41,18 +42,34 @@ public class WinDebugManager extends DebuggerManager {
        @Override
        public WinDebug newDebugger(ConsoleManager cm, AHost host, Object 
server_name, PhpBuild build, int process_id) {
                ensureFindWinDbgExe(cm, host);
+               
+               WinDebug dbg = null;
                if (StringUtil.isNotEmpty(win_dbg_exe)) {
                        ensureFindSourceAndDebugPack(cm, host, build);
                        
                        try {
-                               return new WinDebug(host, win_dbg_exe, 
toServerName(server_name), src_path, debug_path, build.getBuildPath(), 
process_id);
+                               dbg = new WinDebug(host, win_dbg_exe, 
toServerName(server_name), src_path, debug_path, build.getBuildPath(), 
process_id);
                        } catch ( Exception ex ) {
                                
cm.addGlobalException(EPrintType.OPERATION_FAILED_CONTINUING, getClass(), 
"newDebugger", ex, "", host, win_dbg_exe);
                        }
+                       
+                       if (dbg != null && dbg.attached) {
+                               if (!displayed_windbg_tips) {
+                                       displayed_windbg_tips = true;
+                                       
+                                       displayWindebugTips(cm);
+                               }
+                       }                       
                }
-               return null;
+               return dbg;
        }
        
+       protected void displayWindebugTips(ConsoleManager cm) {
+               cm.println(EPrintType.TIP, getClass(), "  WinDebug command: k   
    - show callstack");
+               cm.println(EPrintType.TIP, getClass(), "  WinDebug command: g   
    - go (until next exception)");
+               cm.println(EPrintType.TIP, getClass(), "  WinDebug command: 
<F9>    - set breakpoint");
+       }
+
        public static class WinDebug extends Debugger {
                protected final ExecHandle debug_handle;
                protected final String log_file;

Reply via email to