Commit: 8910df089068047d9e73934439ea085898a09312
Author: Matt Ficken <v-maf...@microsoft.com> Mon, 18 Nov 2013
10:44:46 -0800
Parents: 1c3e291736a176624081cb6bba69a4d5faf9f846
Branches: master
Link:
http://git.php.net/?p=pftt2.git;a=commitdiff;h=8910df089068047d9e73934439ea085898a09312
Log:
scenario updates
Changed paths:
M src/com/mostc/pftt/scenario/BuiltinWebServerScenario.java
M src/com/mostc/pftt/scenario/CLIScenario.java
M src/com/mostc/pftt/scenario/MSSQLScenario.java
M src/com/mostc/pftt/scenario/OpcacheNoStartupProcessScenario.java
M src/com/mostc/pftt/scenario/OpcacheScenario.java
M src/com/mostc/pftt/scenario/ProductionWebServerScenario.java
M src/com/mostc/pftt/scenario/SAPIScenario.java
M src/com/mostc/pftt/scenario/WebServerScenario.java
M src/com/mostc/pftt/scenario/WinCacheUScenario.java
M src/com/mostc/pftt/scenario/WinCacheU_FileAndUserCacheScenario.java
M src/com/mostc/pftt/scenario/WinCacheU_OnlyFileCacheScenario.java
M src/com/mostc/pftt/scenario/WinCacheU_OnlyUserCacheScenario.java
M src/com/mostc/pftt/util/DllVersion.java
diff --git a/src/com/mostc/pftt/scenario/BuiltinWebServerScenario.java
b/src/com/mostc/pftt/scenario/BuiltinWebServerScenario.java
index 198c822..d6837f7 100644
--- a/src/com/mostc/pftt/scenario/BuiltinWebServerScenario.java
+++ b/src/com/mostc/pftt/scenario/BuiltinWebServerScenario.java
@@ -28,6 +28,7 @@ import
com.mostc.pftt.runner.BuiltinWebHttpPhpUnitTestCaseRunner;
import com.mostc.pftt.runner.BuiltinWebHttpPhptTestCaseRunner;
import com.mostc.pftt.runner.LocalPhpUnitTestPackRunner.PhpUnitThread;
import com.mostc.pftt.runner.LocalPhptTestPackRunner.PhptThread;
+import com.mostc.pftt.runner.PhptTestPreparer.PreparedPhptTestCase;
/** Tests PHP using PHP's builtin web server.
*
@@ -99,6 +100,13 @@ public class BuiltinWebServerScenario extends
WebServerScenario {
}
public static final Trie BUILTIN_WEB_EXPECTED_CRASHES =
PhptTestCase.createNamed(
+ "ext/mbstring/tests/mb_output_handler_euc_jp.phpt",
+ "ext/mbstring/tests/mb_output_handler_pattern-04.phpt",
+ "ext/mbstring/tests/mb_output_handler_pattern-10.phpt",
+
"ext/mbstring/tests/mb_output_handler_runtime_ini_alteration-02.phpt",
+ "ext/tidy/tests/020.phpt",
+ "ext/zlib/tests/ob_004.phpt",
+ "ext/zlib/tests/ob_003.phpt",
"ext/standard/tests/network/udp6loop.phpt",
"ext/standard/tests/serialize/serialization_objects_003.phpt",
"tests/basic/rfc1867_anonymous_upload.phpt",
@@ -270,8 +278,8 @@ public class BuiltinWebServerScenario extends
WebServerScenario {
}
@Override
- public AbstractPhptTestCaseRunner createPhptTestCaseRunner(PhptThread
thread, TestCaseGroupKey group_key, PhptTestCase test_case, ConsoleManager cm,
ITestResultReceiver twriter, AHost host, ScenarioSetSetup scenario_set_setup,
PhpBuild build, PhptSourceTestPack src_test_pack, PhptActiveTestPack
active_test_pack, boolean xdebug, boolean debugger_attached) {
- return new BuiltinWebHttpPhptTestCaseRunner(xdebug, this,
group_key.getPhpIni(), group_key.getEnv(), params, httpproc, httpexecutor,
smgr, thread.getThreadWebServerInstance(), thread, test_case, cm, twriter,
host, scenario_set_setup, build, src_test_pack, active_test_pack);
+ public AbstractPhptTestCaseRunner createPhptTestCaseRunner(PhptThread
thread, TestCaseGroupKey group_key, PreparedPhptTestCase prep, ConsoleManager
cm, ITestResultReceiver twriter, AHost host, ScenarioSetSetup
scenario_set_setup, PhpBuild build, PhptSourceTestPack src_test_pack,
PhptActiveTestPack active_test_pack, boolean xdebug, boolean debugger_attached)
{
+ return new BuiltinWebHttpPhptTestCaseRunner(xdebug, this,
group_key.getPhpIni(), group_key.getEnv(), params, httpproc, httpexecutor,
smgr, thread.getThreadWebServerInstance(), thread, prep, cm, twriter, host,
scenario_set_setup, build, src_test_pack, active_test_pack);
}
diff --git a/src/com/mostc/pftt/scenario/CLIScenario.java
b/src/com/mostc/pftt/scenario/CLIScenario.java
index 89046c7..9cbcab9 100644
--- a/src/com/mostc/pftt/scenario/CLIScenario.java
+++ b/src/com/mostc/pftt/scenario/CLIScenario.java
@@ -29,6 +29,7 @@ import com.mostc.pftt.runner.CliPhpUnitTestCaseRunner;
import com.mostc.pftt.runner.CliPhptTestCaseRunner;
import com.mostc.pftt.runner.LocalPhpUnitTestPackRunner.PhpUnitThread;
import com.mostc.pftt.runner.LocalPhptTestPackRunner.PhptThread;
+import com.mostc.pftt.runner.PhptTestPreparer.PreparedPhptTestCase;
/** Tests the Command Line Interface(CLI) for running PHP.
*
@@ -50,15 +51,15 @@ public class CliScenario extends SAPIScenario {
@Override
public AbstractPhptTestCaseRunner createPhptTestCaseRunner(
- PhptThread thread, TestCaseGroupKey group_key,
PhptTestCase test_case,
+ PhptThread thread, TestCaseGroupKey group_key,
PreparedPhptTestCase prep,
ConsoleManager cm, ITestResultReceiver twriter, AHost
host, ScenarioSetSetup scenario_set_setup,
PhpBuild build, PhptSourceTestPack src_test_pack,
PhptActiveTestPack active_test_pack, boolean xdebug, boolean debugger_attached)
{
- return new CliPhptTestCaseRunner(xdebug, this,
((CliTestCaseGroupKey)group_key).getCliSAPIInstance(), group_key.getPhpIni(),
thread, test_case, cm, twriter, host, scenario_set_setup, build, src_test_pack,
active_test_pack, debugger_attached);
+ return new CliPhptTestCaseRunner(xdebug, this,
((CliTestCaseGroupKey)group_key).getCliSAPIInstance(), group_key.getPhpIni(),
thread, prep, cm, twriter, host, scenario_set_setup, build, src_test_pack,
active_test_pack, debugger_attached);
}
@Override
public int getApprovedInitialThreadPoolSize(AHost host, int threads) {
- return host.getCPUCount() * 2;
+ return host.getCPUCount() * 3;
}
@Override
@@ -117,7 +118,7 @@ public class CliScenario extends SAPIScenario {
// -for WEB SERVERS, have to set ENV vars on each
web server instance
// @see CliPhptTestCaseRunner#prepare
//
- CliSAPIInstance sapi = new CliSAPIInstance(host, build,
ini);
+ CliSAPIInstance sapi = new CliSAPIInstance(cm, host,
build, ini);
return new CliTestCaseGroupKey(sapi, ini, null);
} else if (group_key!=null &&
group_key.getPhpIni().isDefault()) {
@@ -127,7 +128,7 @@ public class CliScenario extends SAPIScenario {
filter.prepareIni(cm, ini);
- CliSAPIInstance sapi = new CliSAPIInstance(host, build,
ini);
+ CliSAPIInstance sapi = new CliSAPIInstance(cm, host,
build, ini);
return new CliTestCaseGroupKey(sapi, ini, null);
}
@@ -270,7 +271,17 @@ public class CliScenario extends SAPIScenario {
"ext/standard/tests/file/fgets_socket_variation2.phpt",
"ext/standard/tests/network/tcp4loop.phpt",
"zend/tests/multibyte/multibyte_encoding_003.phpt",
- "zend/tests/multibyte/multibyte_encoding_002.phpt"
+ "zend/tests/multibyte/multibyte_encoding_002.phpt",
+ "ext/pdo_sqlite/tests/bug33841.phpt",
+ "ext/pdo_sqlite/tests/bug46139.phpt",
+ "ext/pdo_sqlite/tests/bug52487.phpt",
+ "ext/pdo_pgsql/tests/bug64953.phpt",
+ "ext/pdo_pgsql/tests/bug_33876.phpt",
+ "ext/pdo_pgsql/tests/copy_from.phpt",
+ "ext/pdo_pgsql/tests/copy_to.phpt",
+ "ext/pdo_pgsql/tests/is_in_transaction.phpt",
+ "ext/pdo_pgsql/tests/bug48764.phpt",
+ "ext/pdo_pgsql/tests/large_objects.phpt"
);
@Override
public boolean willSkip(ConsoleManager cm, ITestResultReceiver twriter,
AHost host, ScenarioSetSetup setup, ESAPIType type, PhpBuild build,
PhptSourceTestPack src_test_pack, PhptTestCase test_case) throws Exception {
diff --git a/src/com/mostc/pftt/scenario/MSSQLScenario.java
b/src/com/mostc/pftt/scenario/MSSQLScenario.java
index e47512b..4a76595 100644
--- a/src/com/mostc/pftt/scenario/MSSQLScenario.java
+++ b/src/com/mostc/pftt/scenario/MSSQLScenario.java
@@ -14,6 +14,7 @@ import com.mostc.pftt.model.core.PhpBuild;
import com.mostc.pftt.model.core.PhpIni;
import com.mostc.pftt.results.ConsoleManager;
import com.mostc.pftt.results.EPrintType;
+import com.mostc.pftt.util.DllVersion;
/** Tests the mssql and pdo_mssql extensions against a Microsoft SQL Server.
(NOT IMPLEMENTED)
*
@@ -24,6 +25,17 @@ import com.mostc.pftt.results.EPrintType;
public class MSSQLScenario extends DatabaseScenario {
public static final int DEFAULT_MSSQL_PORT = 1433;
protected final String host_address;
+ protected DllVersion set_dll;
+
+ public MSSQLScenario(DllVersion dll, AHost host, String
default_username, String default_password) {
+ this(EMSSQLVersion.DRIVER11, host, default_username,
default_password);
+ this.set_dll = dll;
+ }
+
+ public MSSQLScenario(DllVersion dll, String host_address, String
default_username, String default_password) {
+ this(EMSSQLVersion.DRIVER11, host_address, default_username,
default_password);
+ this.set_dll = dll;
+ }
public MSSQLScenario(EMSSQLVersion version, AHost host, String
default_username, String default_password) {
super(version, host, default_username, default_password);
@@ -115,7 +127,7 @@ public class MSSQLScenario extends DatabaseScenario {
String base_dir = host.getPfttCacheDir()+"/dep/MSSQL/";
String dll1 =
((EMSSQLVersion)version).getPhpPdoDllName(build.getVersionBranch(cm, host),
build.getBuildType(host), base_dir);
- String dll2 =
((EMSSQLVersion)version).getPhpDllName(build.getVersionBranch(cm, host),
build.getBuildType(host), base_dir);
+ String dll2 =
set_dll!=null?set_dll.getPath():((EMSSQLVersion)version).getPhpDllName(build.getVersionBranch(cm,
host), build.getBuildType(host), base_dir);
host.copy(host.joinIntoOnePath(base_dir, dll1),
build.getDefaultExtensionDir()+"/php_pdo_sqlsrv.dll");
host.copy(host.joinIntoOnePath(base_dir, dll2),
build.getDefaultExtensionDir()+"/php_sqlsrv.dll");
diff --git a/src/com/mostc/pftt/scenario/OpcacheNoStartupProcessScenario.java
b/src/com/mostc/pftt/scenario/OpcacheNoStartupProcessScenario.java
index 18da605..b72ba99 100644
--- a/src/com/mostc/pftt/scenario/OpcacheNoStartupProcessScenario.java
+++ b/src/com/mostc/pftt/scenario/OpcacheNoStartupProcessScenario.java
@@ -7,6 +7,14 @@ import com.mostc.pftt.results.ConsoleManager;
import com.mostc.pftt.util.DllVersion;
public class OpcacheNoStartupProcessScenario extends OpcacheScenario {
+
+ public OpcacheNoStartupProcessScenario() {
+ super();
+ }
+
+ public OpcacheNoStartupProcessScenario(DllVersion dll) {
+ super(dll);
+ }
@Override
protected boolean shouldUseStartupProcess(Host host) {
diff --git a/src/com/mostc/pftt/scenario/OpcacheScenario.java
b/src/com/mostc/pftt/scenario/OpcacheScenario.java
index 8bc7c90..852623a 100644
--- a/src/com/mostc/pftt/scenario/OpcacheScenario.java
+++ b/src/com/mostc/pftt/scenario/OpcacheScenario.java
@@ -33,23 +33,36 @@ import com.mostc.pftt.util.DllVersion;
*/
public class OpcacheScenario extends CodeCacheScenario {
+ protected final DllVersion set_dll;
+
+ public OpcacheScenario() {
+ this.set_dll = null;
+ }
+
+ public OpcacheScenario(DllVersion dll) {
+ this.set_dll = dll;
+ }
@Override
public void addToDebugPath(ConsoleManager cm, AHost host, PhpBuild
build, Collection<String> debug_path) {
- try {
- switch(build.getVersionBranch(cm, host)) {
- case PHP_5_3:
- debug_path.add( build.isNTS(host) ?
getDllPath53NTS(host).getDebugPath() : getDllPath53TS(host).getDebugPath() );
- break;
- case PHP_5_4:
- debug_path.add( build.isNTS(host) ?
getDllPath54NTS(host).getDebugPath() : getDllPath54TS(host).getDebugPath() );
- break;
- default:
- // OpCache is included with core 5.5+, so the
core debug-pack will be enough (don't need to do anything here)
- break;
+ if (this.set_dll!=null) {
+ debug_path.add(set_dll.getDebugPath());
+ } else {
+ try {
+ switch(build.getVersionBranch(cm, host)) {
+ case PHP_5_3:
+ debug_path.add( build.isNTS(host) ?
getDllPath53NTS(host).getDebugPath() : getDllPath53TS(host).getDebugPath() );
+ break;
+ case PHP_5_4:
+ debug_path.add( build.isNTS(host) ?
getDllPath54NTS(host).getDebugPath() : getDllPath54TS(host).getDebugPath() );
+ break;
+ default:
+ // OpCache is included with core 5.5+,
so the core debug-pack will be enough (don't need to do anything here)
+ break;
+ }
+ } catch ( Exception ex ) {
+ ex.printStackTrace();
}
- } catch ( Exception ex ) {
- ex.printStackTrace();
}
}
@@ -117,22 +130,22 @@ public class OpcacheScenario extends CodeCacheScenario {
@Overridable
protected DllVersion getDllPath53TS(Host host) {
- return new
DllVersion(host.getPfttCacheDir()+"/dep/opcache/php_opcache-7.0.2-5.3-ts-vc9-x86",
"php_opcache.dll", "php_opcache.pdb", "7.0.2");
+ return new
DllVersion(host.getPfttCacheDir()+"/dep/opcache/php_opcache-7.0.2-5.3-ts-vc9-x86",
"php_opcache.dll", "7.0.2");
}
@Overridable
protected DllVersion getDllPath53NTS(Host host) {
- return new
DllVersion(host.getPfttCacheDir()+"/dep/opcache/php_opcache-7.0.2-5.3-nts-vc9-x86",
"php_opcache.dll", "php_opcache.pdb", "7.0.2");
+ return new
DllVersion(host.getPfttCacheDir()+"/dep/opcache/php_opcache-7.0.2-5.3-nts-vc9-x86",
"php_opcache.dll", "7.0.2");
}
@Overridable
protected DllVersion getDllPath54TS(Host host) {
- return new
DllVersion(host.getPfttCacheDir()+"/dep/opcache/php_opcache-7.0.2-5.4-ts-vc9-x86",
"php_opcache.dll", "php_opcache.pdb", "7.0.2");
+ return new
DllVersion(host.getPfttCacheDir()+"/dep/opcache/php_opcache-7.0.2-5.4-ts-vc9-x86",
"php_opcache.dll", "7.0.2");
}
@Overridable
protected DllVersion getDllPath54NTS(Host host) {
- return new
DllVersion(host.getPfttCacheDir()+"/dep/opcache/php_opcache-7.0.2-5.4-nts-vc9-x86",
"php_opcache.dll", "php_opcache.pdb", "7.0.2");
+ return new
DllVersion(host.getPfttCacheDir()+"/dep/opcache/php_opcache-7.0.2-5.4-nts-vc9-x86",
"php_opcache.dll", "7.0.2");
}
public DllVersion getDllPath(ConsoleManager cm, Host host, PhpBuild
build) {
@@ -140,6 +153,9 @@ public class OpcacheScenario extends CodeCacheScenario {
}
protected DllVersion getDllPath(ConsoleManager cm, Host host, PhpBuild
build, boolean rename) {
+ if (this.set_dll!=null)
+ return this.set_dll;
+
DllVersion version = null;
try {
switch(build.getVersionBranch(cm, host)) {
@@ -264,7 +280,7 @@ public class OpcacheScenario extends CodeCacheScenario {
protected OpcacheSetup createOpcacheSetup(DllVersion dll, Host host,
ConsoleManager cm, PhpBuild build) throws Exception {
return new OpcacheSetup(dll, host, cm, build);
}
-
+
@Override
public OpcacheSetup setup(ConsoleManager cm, Host host, PhpBuild build,
ScenarioSet scenario_set, EScenarioSetPermutationLayer layer) {
if (host.isWindows()) {
diff --git a/src/com/mostc/pftt/scenario/ProductionWebServerScenario.java
b/src/com/mostc/pftt/scenario/ProductionWebServerScenario.java
index 3ce05eb..d509bdd 100644
--- a/src/com/mostc/pftt/scenario/ProductionWebServerScenario.java
+++ b/src/com/mostc/pftt/scenario/ProductionWebServerScenario.java
@@ -21,12 +21,12 @@ public abstract class ProductionWebServerScenario extends
WebServerScenario {
@Override
public int getApprovedInitialThreadPoolSize(AHost host, int threads) {
- return host.getCPUCount() * 3;
+ return host.getCPUCount() * 2;
}
@Override
public int getApprovedMaximumThreadPoolSize(AHost host, int threads) {
- return host.getCPUCount() * 4;
+ return host.getCPUCount() * 3;
}
@Override
diff --git a/src/com/mostc/pftt/scenario/SAPIScenario.java
b/src/com/mostc/pftt/scenario/SAPIScenario.java
index d1ff963..b5ec0e5 100644
--- a/src/com/mostc/pftt/scenario/SAPIScenario.java
+++ b/src/com/mostc/pftt/scenario/SAPIScenario.java
@@ -24,6 +24,7 @@ import com.mostc.pftt.runner.AbstractPhpUnitTestCaseRunner;
import com.mostc.pftt.runner.AbstractPhptTestCaseRunner;
import com.mostc.pftt.runner.LocalPhpUnitTestPackRunner.PhpUnitThread;
import com.mostc.pftt.runner.LocalPhptTestPackRunner.PhptThread;
+import com.mostc.pftt.runner.PhptTestPreparer.PreparedPhptTestCase;
/** Different scenarios for how PHP can be run
*
@@ -72,7 +73,7 @@ public abstract class SAPIScenario extends
AbstractSerialScenario {
*
* @param thread
* @param group_key
- * @param test_case
+ * @param prep
* @param cm
* @param twriter
* @param host
@@ -84,7 +85,7 @@ public abstract class SAPIScenario extends
AbstractSerialScenario {
* @param debugger_attached TODO
* @return
*/
- public abstract AbstractPhptTestCaseRunner
createPhptTestCaseRunner(PhptThread thread, TestCaseGroupKey group_key,
PhptTestCase test_case, ConsoleManager cm, ITestResultReceiver twriter, AHost
host, ScenarioSetSetup scenario_set_setup, PhpBuild build, PhptSourceTestPack
src_test_pack, PhptActiveTestPack active_test_pack, boolean xdebug, boolean
debugger_attached);
+ public abstract AbstractPhptTestCaseRunner
createPhptTestCaseRunner(PhptThread thread, TestCaseGroupKey group_key,
PreparedPhptTestCase prep, ConsoleManager cm, ITestResultReceiver twriter,
AHost host, ScenarioSetSetup scenario_set_setup, PhpBuild build,
PhptSourceTestPack src_test_pack, PhptActiveTestPack active_test_pack, boolean
xdebug, boolean debugger_attached);
public void close(ConsoleManager cm, boolean debug) {
@@ -206,7 +207,58 @@ public abstract class SAPIScenario extends
AbstractSerialScenario {
"ext/standard/tests/strings/htmlentities05.phpt",
"ext/wddx/tests/004.phpt",
"ext/wddx/tests/005.phpt",
- "ext/zlib/tests/bug65391.phpt"
+ "ext/zlib/tests/bug65391.phpt",
+ "ext/standard/tests/array/compact.phpt",
+ "ext/standard/tests/file/bug45181.phpt",
+
"ext/standard/tests/file/file_get_contents_error002.phpt",
+ "ext/standard/tests/file/glob_variation2.phpt",
+ "ext/standard/tests/file/readfile_variation3.phpt",
+ "ext/standard/tests/file/rename_variation9.phpt",
+
"ext/standard/tests/network/gethostbyname_error005.phpt",
+ "ext/standard/tests/serialize/bug64146.phpt",
+ "ext/standard/tests/strings/crypt_chars.phpt",
+
"ext/standard/tests/strings/quoted_printable_encode_002.phpt",
+ "ext/xsl/tests/bug26384.phpt",
+ "ext/xsl/tests/xslt009.phpt",
+ "ext/xsl/tests/xslt010.phpt",
+ "tests/classes/factory_and_singleton_002.phpt",
+ "tests/func/005a.phpt",
+ "tests/output/bug60321.phpt",
+ "tests/output/ob_get_status.phpt",
+ "zend/tests/bug39542.phpt",
+ "zend/tests/exception_009.phpt",
+ "zend/tests/multibyte/multibyte_encoding_001.phpt",
+ "zend/tests/multibyte/multibyte_encoding_005.phpt",
+ "zend/tests/ns_086.phpt",
+ "ext/curl/tests/curl_copy_handle_basic_008.phpt",
+ "ext/curl/tests/curl_curlopt_readdata.phpt",
+ "ext/curl/tests/curl_writeheader_callback.phpt",
+ "ext/date/tests/bug28024.phpt",
+ "ext/date/tests/bug32086.phpt",
+ "ext/date/tests/bug35425.phpt",
+ "ext/date/tests/date_default_timezone_get-3.phpt",
+ "ext/dom/tests/domdocument_load_variation4.phpt",
+ "ext/dom/tests/domdocument_loadxml_variation4.phpt",
+ "ext/filter/tests/bug52209.phpt",
+ "ext/gettext/tests/gettext_basic.phpt",
+ "ext/intl/tests/timezone_getdisplayname_variant3.phpt",
+ "ext/mbstring/tests/mb_http_input.phpt",
+ "ext/pdo_sqlite/tests/bug_63916.phpt",
+ "ext/sqlite3/tests/bug63921-64bit.phpt",
+ "ext/standard/tests/general_functions/002.phpt",
+ "ext/standard/tests/general_functions/006.phpt",
+ "ext/standard/tests/strings/htmlentities.phpt",
+ "ext/zlib/tests/bug55544.phpt",
+ "ext/zlib/tests/bug_52944-darwin.phpt",
+ "ext/zlib/tests/ob_001.phpt",
+ "sapi/cli/tests/bug65066_100.phpt",
+ "ext/date/tests/bug32555.phpt",
+ "ext/standard/tests/strings/fprintf_variation_007.phpt",
+ "ext/reflection/tests/005.phpt",
+ "zend/tests/bug64720.phpt",
+ "ext/zip/tests/bug40228.phpt",
+ "ext/zip/tests/bug7214.phpt",
+ "zend/tests/bug40236.phpt"
);
public static Trie NON_WINDOWS_EXTS =
PhptTestCase.createExtensions("sysvsem", "sysvmsg", "sysvshm", "gettext",
"exif", "readline", "posix", "shmop");
public static Trie SCENARIO_EXTS = PhptTestCase.createExtensions("dba",
"sybase", "snmp", "interbase", "ldap", "imap", "oci8", "pcntl", "soap",
"xmlrpc", "pdo", "odbc", "pdo_mssql", "mssql", "pdo_pgsql", "sybase_ct", "ftp",
"curl");
diff --git a/src/com/mostc/pftt/scenario/WebServerScenario.java
b/src/com/mostc/pftt/scenario/WebServerScenario.java
index 6391e3c..f086e26 100644
--- a/src/com/mostc/pftt/scenario/WebServerScenario.java
+++ b/src/com/mostc/pftt/scenario/WebServerScenario.java
@@ -43,6 +43,7 @@ import com.mostc.pftt.runner.HttpPhpUnitTestCaseRunner;
import com.mostc.pftt.runner.HttpPhptTestCaseRunner;
import com.mostc.pftt.runner.LocalPhpUnitTestPackRunner.PhpUnitThread;
import com.mostc.pftt.runner.LocalPhptTestPackRunner.PhptThread;
+import com.mostc.pftt.runner.PhptTestPreparer.PreparedPhptTestCase;
/** scenarios for testing PHP while its running under a web server
*
@@ -101,8 +102,8 @@ public abstract class WebServerScenario extends
SAPIScenario {
}
@Override
- public AbstractPhptTestCaseRunner createPhptTestCaseRunner(PhptThread
thread, TestCaseGroupKey group_key, PhptTestCase test_case, ConsoleManager cm,
ITestResultReceiver twriter, AHost host, ScenarioSetSetup scenario_set_setup,
PhpBuild build, PhptSourceTestPack src_test_pack, PhptActiveTestPack
active_test_pack, boolean xdebug, boolean debugger_attached) {
- return new HttpPhptTestCaseRunner(xdebug, this,
group_key.getPhpIni(), group_key.getEnv(), params, httpproc, httpexecutor,
smgr, thread.getThreadWebServerInstance(), thread, test_case, cm, twriter,
host, scenario_set_setup, build, src_test_pack, active_test_pack);
+ public AbstractPhptTestCaseRunner createPhptTestCaseRunner(PhptThread
thread, TestCaseGroupKey group_key, PreparedPhptTestCase prep, ConsoleManager
cm, ITestResultReceiver twriter, AHost host, ScenarioSetSetup
scenario_set_setup, PhpBuild build, PhptSourceTestPack src_test_pack,
PhptActiveTestPack active_test_pack, boolean xdebug, boolean debugger_attached)
{
+ return new HttpPhptTestCaseRunner(xdebug, this,
group_key.getPhpIni(), group_key.getEnv(), params, httpproc, httpexecutor,
smgr, thread.getThreadWebServerInstance(), thread, prep, cm, twriter, host,
scenario_set_setup, build, src_test_pack, active_test_pack);
}
@Override
diff --git a/src/com/mostc/pftt/scenario/WinCacheUScenario.java
b/src/com/mostc/pftt/scenario/WinCacheUScenario.java
index 255c71d..9a5e1cb 100644
--- a/src/com/mostc/pftt/scenario/WinCacheUScenario.java
+++ b/src/com/mostc/pftt/scenario/WinCacheUScenario.java
@@ -10,6 +10,7 @@ import com.mostc.pftt.model.core.PhpBuild;
import com.mostc.pftt.model.core.PhpIni;
import com.mostc.pftt.results.ConsoleManager;
import com.mostc.pftt.results.EPrintType;
+import com.mostc.pftt.util.DllVersion;
/** Using only the user, object and file caching components of WinCache, NOT
the code caching.
* Can be used with Opcache just like APCU (but its designed for Windows, so
for CLI and IIS
@@ -21,24 +22,37 @@ import com.mostc.pftt.results.EPrintType;
// TODO http://us.php.net/manual/en/wincache.stats.php
// TODO mediawiki support
public abstract class WinCacheUScenario extends UserCacheScenario {
+ protected final DllVersion set_dll;
+
+ public WinCacheUScenario() {
+ this.set_dll = null;
+ }
+
+ public WinCacheUScenario(DllVersion dll) {
+ this.set_dll = dll;
+ }
@Override
public void addToDebugPath(ConsoleManager cm, AHost host, PhpBuild
build, Collection<String> debug_path) {
- try {
- switch(build.getVersionBranch(cm, host)) {
- case PHP_5_3:
- debug_path.add(
host.getPfttCacheDir()+"/dep/wincache/wincache-1.3.4-5.3-nts-vc11-x86/php_wincache.pdb"
);
- break;
- case PHP_5_4:
- debug_path.add(
host.getPfttCacheDir()+"/dep/wincache/wincache-1.3.4-5.4-nts-vc11-x86/php_wincache.pdb"
);
- break;
- case PHP_5_5:
- default:
- debug_path.add(
host.getPfttCacheDir()+"/dep/wincache/wincache-1.3.5-5.5-nts-vc11-x86/php_wincache.pdb"
);
- break;
+ if (this.set_dll!=null) {
+ debug_path.add(set_dll.getDebugPath());
+ } else {
+ try {
+ switch(build.getVersionBranch(cm, host)) {
+ case PHP_5_3:
+ debug_path.add(
host.getPfttCacheDir()+"/dep/wincache/wincache-1.3.4-5.3-nts-vc11-x86/php_wincache.pdb"
);
+ break;
+ case PHP_5_4:
+ debug_path.add(
host.getPfttCacheDir()+"/dep/wincache/wincache-1.3.4-5.4-nts-vc11-x86/php_wincache.pdb"
);
+ break;
+ case PHP_5_5:
+ default:
+ debug_path.add(
host.getPfttCacheDir()+"/dep/wincache/wincache-1.3.5-5.5-nts-vc11-x86/php_wincache.pdb"
);
+ break;
+ }
+ } catch ( Exception ex ) {
+ ex.printStackTrace();
}
- } catch ( Exception ex ) {
- ex.printStackTrace();
}
}
@@ -64,24 +78,22 @@ public abstract class WinCacheUScenario extends
UserCacheScenario {
protected String getDllPath53(Host host) {
return
host.getPfttCacheDir()+"/dep/wincache/wincache-1.3.4-5.3-nts-vc9-x86/php_wincache.dll";
}
-
- // @see http://us.php.net/manual/en/wincache.configuration.php
- boolean first = true;
- @Override
- public IScenarioSetup setup(ConsoleManager cm, Host host, PhpBuild
build, PhpIni ini) {
+
+ public IScenarioSetup setup(ConsoleManager cm, Host host, PhpBuild
build, ScenarioSet scenario_set, EScenarioSetPermutationLayer layer) {
if (!host.isWindows() || !build.isNTS(host))
return SETUP_FAILED;
- // TODO temp
- if (first) {
- String dll_path;
- EBuildBranch branch;
- try {
- branch = build.getVersionBranch(cm, host);
- } catch ( Exception ex ) {
- ex.printStackTrace();
- return SETUP_FAILED;
- }
+ String dll_path;
+ EBuildBranch branch;
+ try {
+ branch = build.getVersionBranch(cm, host);
+ } catch ( Exception ex ) {
+ ex.printStackTrace();
+ return SETUP_FAILED;
+ }
+ if (set_dll!=null) {
+ dll_path = set_dll.getPath();
+ } else {
switch(branch) {
case PHP_5_3:
dll_path = getDllPath53(host);
@@ -93,28 +105,26 @@ public abstract class WinCacheUScenario extends
UserCacheScenario {
dll_path = getDllPath55Plus(host);
break;
}
- // install wincache
- try {
- host.copy(dll_path,
build.getDefaultExtensionDir()+"/php_wincache.dll");
- } catch ( Exception ex ) {
- ex.printStackTrace();
- return SETUP_FAILED;
- }
-
- cm.println(EPrintType.CLUE, getClass(), "Found WinCache
in: "+dll_path);
- first = false;
+ }
+ // install wincache
+ try {
+ host.copy(dll_path,
build.getDefaultExtensionDir()+"/php_wincache.dll");
+ } catch ( Exception ex ) {
+ ex.printStackTrace();
+ return SETUP_FAILED;
}
- // enable wincache
- ini.putMulti(PhpIni.EXTENSION, "php_wincache.dll");
+ cm.println(EPrintType.CLUE, getClass(), "Found WinCache in:
"+dll_path);
- ini.putSingle("wincache.enablecli", "1");
+ return new WinCacheUScenarioSetup();
+ }
+ @Override
+ public IScenarioSetup setup(ConsoleManager cm, Host host, PhpBuild
build, PhpIni ini) {
+ if (!host.isWindows() || !build.isNTS(host))
+ return SETUP_FAILED;
configure(ini);
- // DISABLE opcode caching (required to use wincacheu with
opcache scenarios)
- ini.putSingle("wincache.ocenabled", "0");
-
return new WinCacheUScenarioSetup();
}
@@ -137,7 +147,17 @@ public abstract class WinCacheUScenario extends
UserCacheScenario {
} // end public class WinCacheUScenarioSetup
- protected abstract void configure(PhpIni ini);
+ // @see http://us.php.net/manual/en/wincache.configuration.php
+ @Overridable
+ protected void configure(PhpIni ini) {
+ // enable wincache
+ ini.putMulti(PhpIni.EXTENSION, "php_wincache.dll");
+
+ ini.putSingle("wincache.enablecli", "1");
+
+ // DISABLE opcode caching (required to use wincacheu with
opcache scenarios)
+ ini.putSingle("wincache.ocenabled", "0");
+ }
@Override
public boolean isSupported(ConsoleManager cm, Host host, PhpBuild
build, ScenarioSet scenario_set, EScenarioSetPermutationLayer layer) {
@@ -179,4 +199,4 @@ public abstract class WinCacheUScenario extends
UserCacheScenario {
return true;
}
-}
+} // end public abstract class WinCacheUScenario
diff --git
a/src/com/mostc/pftt/scenario/WinCacheU_FileAndUserCacheScenario.java
b/src/com/mostc/pftt/scenario/WinCacheU_FileAndUserCacheScenario.java
index 72718a8..0473c5f 100644
--- a/src/com/mostc/pftt/scenario/WinCacheU_FileAndUserCacheScenario.java
+++ b/src/com/mostc/pftt/scenario/WinCacheU_FileAndUserCacheScenario.java
@@ -1,11 +1,21 @@
package com.mostc.pftt.scenario;
import com.mostc.pftt.model.core.PhpIni;
+import com.mostc.pftt.util.DllVersion;
public class WinCacheU_FileAndUserCacheScenario extends WinCacheUScenario {
+
+ public WinCacheU_FileAndUserCacheScenario() {
+ super();
+ }
+
+ public WinCacheU_FileAndUserCacheScenario(DllVersion dll) {
+ super(dll);
+ }
@Override
protected void configure(PhpIni ini) {
+ super.configure(ini);
// enable file caching
ini.putSingle("wincache.fcenabled", "1");
// enable user caching
@@ -17,4 +27,4 @@ public class WinCacheU_FileAndUserCacheScenario extends
WinCacheUScenario {
return "WinCacheU-File-And-User";
}
-}
+} // end public class WinCacheU_FileAndUserCacheScenario
diff --git a/src/com/mostc/pftt/scenario/WinCacheU_OnlyFileCacheScenario.java
b/src/com/mostc/pftt/scenario/WinCacheU_OnlyFileCacheScenario.java
index 09439bf..8ee24b3 100644
--- a/src/com/mostc/pftt/scenario/WinCacheU_OnlyFileCacheScenario.java
+++ b/src/com/mostc/pftt/scenario/WinCacheU_OnlyFileCacheScenario.java
@@ -1,11 +1,21 @@
package com.mostc.pftt.scenario;
import com.mostc.pftt.model.core.PhpIni;
+import com.mostc.pftt.util.DllVersion;
public class WinCacheU_OnlyFileCacheScenario extends WinCacheUScenario {
+
+ public WinCacheU_OnlyFileCacheScenario() {
+ super();
+ }
+
+ public WinCacheU_OnlyFileCacheScenario(DllVersion dll) {
+ super(dll);
+ }
@Override
protected void configure(PhpIni ini) {
+ super.configure(ini);
// enable file caching
ini.putSingle("wincache.fcenabled", "1");
// disable user caching
@@ -17,4 +27,4 @@ public class WinCacheU_OnlyFileCacheScenario extends
WinCacheUScenario {
return "WinCacheU-Only-File";
}
-}
+} // end public class WinCacheU_OnlyFileCacheScenario
diff --git a/src/com/mostc/pftt/scenario/WinCacheU_OnlyUserCacheScenario.java
b/src/com/mostc/pftt/scenario/WinCacheU_OnlyUserCacheScenario.java
index 11e0caa..3715e50 100644
--- a/src/com/mostc/pftt/scenario/WinCacheU_OnlyUserCacheScenario.java
+++ b/src/com/mostc/pftt/scenario/WinCacheU_OnlyUserCacheScenario.java
@@ -1,11 +1,21 @@
package com.mostc.pftt.scenario;
import com.mostc.pftt.model.core.PhpIni;
+import com.mostc.pftt.util.DllVersion;
public class WinCacheU_OnlyUserCacheScenario extends WinCacheUScenario {
+
+ public WinCacheU_OnlyUserCacheScenario() {
+ super();
+ }
+
+ public WinCacheU_OnlyUserCacheScenario(DllVersion dll) {
+ super(dll);
+ }
@Override
protected void configure(PhpIni ini) {
+ super.configure(ini);
// disable file caching
ini.putSingle("wincache.fcenabled", "0");
// enable user caching
@@ -17,4 +27,4 @@ public class WinCacheU_OnlyUserCacheScenario extends
WinCacheUScenario {
return "WinCacheU-Only-User";
}
-}
+} // end public class WinCacheU_OnlyUserCacheScenario
diff --git a/src/com/mostc/pftt/util/DllVersion.java
b/src/com/mostc/pftt/util/DllVersion.java
index dcdddcf..22891f3 100644
--- a/src/com/mostc/pftt/util/DllVersion.java
+++ b/src/com/mostc/pftt/util/DllVersion.java
@@ -10,6 +10,10 @@ public class DllVersion {
this.version = version;
}
+ public DllVersion(String base, String dll_name, String version) {
+ this(base, dll_name, dll_name.replace(".dll", ".pdb"), version);
+ }
+
public String getVersion() {
return version;
}
--
PHP Quality Assurance Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php