Commit: 2a80684d7edf17d419dc5883c92c88e20482e0be Author: Anatol Belski <a...@php.net> Wed, 5 Sep 2018 22:30:54 +0200 Parents: dc9e36b26e9e5fd9978ca500c7a662e5d85b35a4 Branches: revamp_3
Link: http://git.php.net/?p=pftt2.git;a=commitdiff;h=2a80684d7edf17d419dc5883c92c88e20482e0be Log: Deactivate Azure related build for now, the implementation is based on an outdated version Changed paths: M .classpath M src/com/mostc/pftt/model/ApplicationSourceTestPack.java M src/com/mostc/pftt/model/app/PhpUnitActiveTestPack.java M src/com/mostc/pftt/model/app/PhpUnitTemplate.groovy M src/com/mostc/pftt/model/core/PhptSourceTestPack.java M src/com/mostc/pftt/runner/AbstractLocalTestPackRunner.java M src/com/mostc/pftt/runner/AbstractPhpUnitTestCaseRunner.java M src/com/mostc/pftt/runner/AbstractPhptTestCaseRunner2.java M src/com/mostc/pftt/runner/LocalPhpUnitTestPackRunner.java M src/com/mostc/pftt/runner/PhptTestPreparer.java
diff --git a/.classpath b/.classpath index 1a90f1c..30bd82f 100644 --- a/.classpath +++ b/.classpath @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="src" path="src"/> + <classpathentry excluding="com/mostc/pftt/scenario/AzureWebsitesScenario.java|com/mostc/pftt/scenario/AzureKuduVFSScenario.java" kind="src" path="src"/> <classpathentry exported="true" kind="lib" path="lib/htmlcleaner-2.2.jar"/> <classpathentry exported="true" kind="lib" path="lib/icu4j-49_1.jar"/> <classpathentry exported="true" kind="lib" path="lib/icudata.jar"/> diff --git a/src/com/mostc/pftt/model/ApplicationSourceTestPack.java b/src/com/mostc/pftt/model/ApplicationSourceTestPack.java index ce4a290..4cfa72d 100644 --- a/src/com/mostc/pftt/model/ApplicationSourceTestPack.java +++ b/src/com/mostc/pftt/model/ApplicationSourceTestPack.java @@ -11,7 +11,7 @@ import com.mostc.pftt.host.AHost; import com.mostc.pftt.host.LocalHost; import com.mostc.pftt.model.core.EBuildBranch; import com.mostc.pftt.results.ConsoleManager; -import com.mostc.pftt.scenario.AzureWebsitesScenario; +//TODO import com.mostc.pftt.scenario.AzureWebsitesScenario; import com.mostc.pftt.scenario.FileSystemScenario; import com.mostc.pftt.scenario.SAPIScenario; @@ -74,7 +74,7 @@ public abstract class ApplicationSourceTestPack<A extends ActiveTestPack, T exte System.out.println("71 "+local_test_pack_dir); //System.exit(0); - if (AzureWebsitesScenario.check(sapi_scenario)) { + if (false /* TODO AzureWebsitesScenario.check(sapi_scenario) */) { setRoot("D:\\HOME\\SITE\\WWWROOT\\"+FileSystemScenario.basename(getName()).replace("-12.3", "").replace("-1.20.2", ""));//MEDIAWIKI");//local_test_pack_dir); } else { setRoot(src_root);// TODO temp azure ?? local_test_pack_dir); diff --git a/src/com/mostc/pftt/model/app/PhpUnitActiveTestPack.java b/src/com/mostc/pftt/model/app/PhpUnitActiveTestPack.java index a9d5b31..2cd02b9 100644 --- a/src/com/mostc/pftt/model/app/PhpUnitActiveTestPack.java +++ b/src/com/mostc/pftt/model/app/PhpUnitActiveTestPack.java @@ -1,7 +1,7 @@ package com.mostc.pftt.model.app; import com.mostc.pftt.model.ActiveTestPack; -import com.mostc.pftt.scenario.AzureWebsitesScenario; +// TODO import com.mostc.pftt.scenario.AzureWebsitesScenario; import com.mostc.pftt.scenario.SAPIScenario; public class PhpUnitActiveTestPack extends ActiveTestPack { diff --git a/src/com/mostc/pftt/model/app/PhpUnitTemplate.groovy b/src/com/mostc/pftt/model/app/PhpUnitTemplate.groovy index e4a01c1..0e11630 100644 --- a/src/com/mostc/pftt/model/app/PhpUnitTemplate.groovy +++ b/src/com/mostc/pftt/model/app/PhpUnitTemplate.groovy @@ -1,6 +1,7 @@ package com.mostc.pftt.model.app; import java.util.Map; +import java.util.HashMap; import com.github.mattficken.io.StringUtil; import com.mostc.pftt.host.AHost; diff --git a/src/com/mostc/pftt/model/core/PhptSourceTestPack.java b/src/com/mostc/pftt/model/core/PhptSourceTestPack.java index 815c4a9..8ca4c78 100644 --- a/src/com/mostc/pftt/model/core/PhptSourceTestPack.java +++ b/src/com/mostc/pftt/model/core/PhptSourceTestPack.java @@ -22,7 +22,7 @@ import com.mostc.pftt.results.ConsoleManagerUtil; import com.mostc.pftt.results.EPrintType; import com.mostc.pftt.results.ITestResultReceiver; import com.mostc.pftt.results.PhpResultPackWriter; -import com.mostc.pftt.scenario.AzureKuduVFSScenario; +// TODO import com.mostc.pftt.scenario.AzureKuduVFSScenario; import com.mostc.pftt.scenario.FileSystemScenario; import com.mostc.pftt.scenario.FileSystemScenario.IFileChooser; import com.mostc.pftt.scenario.SAPIScenario; @@ -488,11 +488,11 @@ public class PhptSourceTestPack extends SourceTestPack<PhptActiveTestPack, PhptT public PhptActiveTestPack install(ConsoleManager cm, AHost host, String local_test_pack_dir, String remote_test_pack_dir, SAPIScenario sapi_scenario) throws IllegalStateException, IOException, Exception { cm.println(EPrintType.IN_PROGRESS, getClass(), "install test-pack local="+local_test_pack_dir+" remote="+remote_test_pack_dir+" "+this.host.getClass()+" "+host.getClass()+" fs="+fs.getClass()); - if (fs instanceof AzureKuduVFSScenario) { + if (false /* TODO fs instanceof AzureKuduVFSScenario */) { System.out.println("uploading ZIP file to "+remote_test_pack_dir); // TODO temp - ((AzureKuduVFSScenario)fs).putZip(remote_test_pack_dir, new File("c:\\php-sdk\\php-test-pack-5.4.38.zip")); + // ((AzureKuduVFSScenario)fs).putZip(remote_test_pack_dir, new File("c:\\php-sdk\\php-test-pack-5.4.38.zip")); } else if (!this.host.isRemote() || this.host.equals(host)) { // installing from local host to remote host OR from remote|local host to itself diff --git a/src/com/mostc/pftt/runner/AbstractLocalTestPackRunner.java b/src/com/mostc/pftt/runner/AbstractLocalTestPackRunner.java index 84353ce..44468f0 100644 --- a/src/com/mostc/pftt/runner/AbstractLocalTestPackRunner.java +++ b/src/com/mostc/pftt/runner/AbstractLocalTestPackRunner.java @@ -37,7 +37,7 @@ import com.mostc.pftt.results.EPrintType; import com.mostc.pftt.results.ITestResultReceiver; import com.mostc.pftt.results.PhpResultPackWriter; import com.mostc.pftt.runner.LocalPhpUnitTestPackRunner.PhpUnitThread; -import com.mostc.pftt.scenario.AzureWebsitesScenario; +//import com.mostc.pftt.scenario.AzureWebsitesScenario; import com.mostc.pftt.scenario.EScenarioSetPermutationLayer; import com.mostc.pftt.scenario.FileSystemScenario; import com.mostc.pftt.scenario.IScenarioSetup; @@ -254,7 +254,7 @@ public abstract class AbstractLocalTestPackRunner<A extends ActiveTestPack, S ex runner_state.set(ETestPackRunnerState.RUNNING); checkHost(storage_host); checkHost(runner_host); - AzureWebsitesScenario.first = true; // TODO temp azure +// AzureWebsitesScenario.first = true; // TODO temp azure scenario_set_setup = ScenarioSetSetup.setupScenarioSet(cm, runner_fs, runner_host, build, scenario_set, getScenarioSetPermutationLayer()); if (scenario_set_setup==null) return; diff --git a/src/com/mostc/pftt/runner/AbstractPhpUnitTestCaseRunner.java b/src/com/mostc/pftt/runner/AbstractPhpUnitTestCaseRunner.java index d0b0f2f..6b4915f 100644 --- a/src/com/mostc/pftt/runner/AbstractPhpUnitTestCaseRunner.java +++ b/src/com/mostc/pftt/runner/AbstractPhpUnitTestCaseRunner.java @@ -24,7 +24,7 @@ import com.mostc.pftt.results.ITestResultReceiver; import com.mostc.pftt.results.TestCaseCodeCoverage; import com.mostc.pftt.results.PhpUnitTestResult; import com.mostc.pftt.runner.LocalPhpUnitTestPackRunner.PhpUnitThread; -import com.mostc.pftt.scenario.AzureWebsitesScenario; +//import com.mostc.pftt.scenario.AzureWebsitesScenario; import com.mostc.pftt.scenario.DatabaseScenario; import com.mostc.pftt.scenario.DatabaseScenario.DatabaseScenarioSetup; import com.mostc.pftt.scenario.EScenarioSetPermutationLayer; @@ -142,7 +142,7 @@ public abstract class AbstractPhpUnitTestCaseRunner extends AbstractApplicationU @Override public void runTest(ConsoleManager cm, LocalPhpUnitTestPackRunner.PhpUnitThread t, LocalPhpUnitTestPackRunner r) throws Exception { - if (!AzureWebsitesScenario.check(sapi_scenario)) { + if (false /* TODO !AzureWebsitesScenario.check(sapi_scenario) */) { fs.createDirs(my_temp_dir); // TODO only do this once per thread } @@ -162,7 +162,7 @@ public abstract class AbstractPhpUnitTestCaseRunner extends AbstractApplicationU // String output, template_file; - if (AzureWebsitesScenario.check(fs)) { + if (false /* TODO AzureWebsitesScenario.check(fs) */) { output = execute("template_file"); template_file = null; @@ -203,7 +203,7 @@ System.out.println("187"); // (will not have been able to print out the code coverage data in this case) twriter.addResult(host, scenario_set, new PhpUnitTestResult(test_case, status, scenario_set, host, output, ini, run_time_micros, null, getSAPIOutput(), getSAPIConfig())); - } else if (!AzureWebsitesScenario.check(fs)){ + } else if (false /* TODO !AzureWebsitesScenario.check(fs) */){ // CRASH may really be a syntax error (BORK), check to make sure final ExecOutput syntax_eo = host.execOut( build.getPhpExe()+" -l "+template_file, @@ -318,9 +318,9 @@ System.out.println("187"); } } - if (!AzureWebsitesScenario.check(sapi_scenario)) { + /* TODO if (!AzureWebsitesScenario.check(sapi_scenario)) { fs.delete(my_temp_dir); - } + }*/ } // end public void runTest protected PhpUnitTestResult notifyNotPass(PhpUnitTestResult result) { diff --git a/src/com/mostc/pftt/runner/AbstractPhptTestCaseRunner2.java b/src/com/mostc/pftt/runner/AbstractPhptTestCaseRunner2.java index 94b0ce3..6e649fa 100644 --- a/src/com/mostc/pftt/runner/AbstractPhptTestCaseRunner2.java +++ b/src/com/mostc/pftt/runner/AbstractPhptTestCaseRunner2.java @@ -164,6 +164,7 @@ public abstract class AbstractPhptTestCaseRunner2 extends AbstractPhptTestCaseRu } public AbstractPhptTestCaseRunner2(boolean xdebug, SAPIScenario sapi_scenario, PhpIni ini, PhptThread thread, PreparedPhptTestCase prep, ConsoleManager cm, ITestResultReceiver twriter, AHost host, ScenarioSetSetup scenario_set, PhpBuild build, PhptSourceTestPack src_test_pack, PhptActiveTestPack active_test_pack) { + super(xdebug, null, sapi_scenario, ini, thread, prep, cm, twriter, host, scenario_set, build, src_test_pack, active_test_pack); this.xdebug = xdebug; this.sapi_scenario = sapi_scenario; this.ini = ini; @@ -220,7 +221,7 @@ public abstract class AbstractPhptTestCaseRunner2 extends AbstractPhptTestCaseRu // // find 'skip ' or 'skip...' or 'skip.. ' or 'skip' but ignore '404 error, file not found abc.skip.php' // (don't need to check for multiple occurences of 'skip', just one... finding abc.skip.php would be a TEST_EXCEPTION or FAIL anyway) - if ((is_timeout||lc_output.contains("skip")||lc_output.contains("error")) && ( !( this instanceof HttpPhptTestCaseRunner ) || !lc_output.contains("404")) ) { + if ((is_timeout||lc_output.contains("skip")||lc_output.contains("error")) && ( /*!( this instanceof HttpPhptTestCaseRunner ) ||*/ !lc_output.contains("404")) ) { // test is to be skipped // decide to mark test SKIP or XSKIP (could test be executed on this OS?) @@ -255,7 +256,8 @@ public abstract class AbstractPhptTestCaseRunner2 extends AbstractPhptTestCaseRu * @throws Exception */ protected void prepareTest() throws Exception { - prep.prepareTest(src_test_pack, host); + //prep.prepareTest(src_test_pack, host); + prep.prepareTest(src_test_pack, fs); // copy STDIN to pass (POST, POST_RAW, STDIN, etc...) if (prep.test_case.containsSection(EPhptSection.POST_RAW)) { @@ -275,8 +277,8 @@ public abstract class AbstractPhptTestCaseRunner2 extends AbstractPhptTestCaseRu setContentType(content_type); first_ct = false; - if (this instanceof HttpPhptTestCaseRunner) - continue; // TODO + /*if (this instanceof HttpPhptTestCaseRunner) + continue; // TODO*/ } else if (first_ct) { // content type may look like this: // "multipart/form-data" or "application/x-www-urlencoded" @@ -515,7 +517,7 @@ public abstract class AbstractPhptTestCaseRunner2 extends AbstractPhptTestCaseRu output = remove_header_from_output(output); String output_trim = output.trim(); - if (StringUtil.isEmpty(output_trim)||(this instanceof HttpPhptTestCaseRunner&&output.contains("<html>")&&!output.contains("404"))) { + if (StringUtil.isEmpty(output_trim)||(/*this instanceof HttpPhptTestCaseRunner&&*/output.contains("<html>")&&!output.contains("404"))) { return notifyPassOrXFail(new PhptTestResult(host, prep.test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, prep.test_case, output, null, null, charset, ini, env, splitCmdString(), stdin_post, getShellScript(), null, null, preoverride_actual, getSAPIOutput(), getSAPIConfig(), code_coverage)); } } diff --git a/src/com/mostc/pftt/runner/LocalPhpUnitTestPackRunner.java b/src/com/mostc/pftt/runner/LocalPhpUnitTestPackRunner.java index 8798b36..8365bc1 100644 --- a/src/com/mostc/pftt/runner/LocalPhpUnitTestPackRunner.java +++ b/src/com/mostc/pftt/runner/LocalPhpUnitTestPackRunner.java @@ -22,7 +22,7 @@ import com.mostc.pftt.results.PhpUnitTestResult; import com.mostc.pftt.scenario.CodeCacheScenario; import com.mostc.pftt.scenario.FileSystemScenario.ITestPackStorageDir; import com.mostc.pftt.scenario.SMBScenario.SMBStorageDir; -import com.mostc.pftt.scenario.AzureWebsitesScenario; +// TODO import com.mostc.pftt.scenario.AzureWebsitesScenario; import com.mostc.pftt.scenario.EScenarioSetPermutationLayer; import com.mostc.pftt.scenario.IScenarioSetup; import com.mostc.pftt.scenario.ScenarioSetSetup; @@ -99,7 +99,7 @@ public class LocalPhpUnitTestPackRunner extends AbstractLocalApplicationTestPack ss = ScenarioSetSetup.setupScenarioSet(cm, runner_fs, runner_host, build, scenario_set, EScenarioSetPermutationLayer.FUNCTIONAL_TEST_APPLICATION); - if (AzureWebsitesScenario.check(sapi_scenario)) { + if (false /* TODO AzureWebsitesScenario.check(sapi_scenario)*/) { my_temp_dir = "D:\\LOCAL\\TEMP"; } else { my_temp_dir = runner_fs.fixPath(runner_fs.mktempname(temp_base_dir, getClass()) + "/"); @@ -118,9 +118,9 @@ public class LocalPhpUnitTestPackRunner extends AbstractLocalApplicationTestPack super.run(); // be sure to cleanup - if (!AzureWebsitesScenario.check(sapi_scenario)) { + /* TODO if (!AzureWebsitesScenario.check(sapi_scenario)) { runner_fs.deleteIfExists(my_temp_dir); - } + } */ } @Override diff --git a/src/com/mostc/pftt/runner/PhptTestPreparer.java b/src/com/mostc/pftt/runner/PhptTestPreparer.java index c2ce253..cb3ae79 100644 --- a/src/com/mostc/pftt/runner/PhptTestPreparer.java +++ b/src/com/mostc/pftt/runner/PhptTestPreparer.java @@ -9,7 +9,7 @@ import com.mostc.pftt.model.core.EPhptSection; import com.mostc.pftt.model.core.PhptActiveTestPack; import com.mostc.pftt.model.core.PhptSourceTestPack; import com.mostc.pftt.model.core.PhptTestCase; -import com.mostc.pftt.scenario.AzureWebsitesScenario; +// TODO import com.mostc.pftt.scenario.AzureWebsitesScenario; import com.mostc.pftt.scenario.FileSystemScenario; public class PhptTestPreparer { @@ -29,7 +29,7 @@ public class PhptTestPreparer { prep.base_file_name = FileSystemScenario.basename(test_case.getBaseName()).replace("+", ""); // - if (!AzureWebsitesScenario.check(fs)) { + if (false /* TODO !AzureWebsitesScenario.check(fs) */) { if (test_case.containsSection(EPhptSection.SKIPIF)) { prep.skipif_file = host.joinIntoOnePath(prep.test_dir, prep.base_file_name + ".skip.php"); @@ -56,9 +56,9 @@ public class PhptTestPreparer { if (test_case.containsSection(EPhptSection.CLEAN)) { prep.test_clean = host.joinIntoOnePath(prep.test_dir, prep.base_file_name + ".clean.php"); - if (!AzureWebsitesScenario.check(fs)) { + /* TODO if (!AzureWebsitesScenario.check(fs)) { fs.saveTextFile(prep.test_clean, test_case.get(EPhptSection.CLEAN)); - } + } */ } // else test_clean = null; return prep; @@ -85,7 +85,7 @@ public class PhptTestPreparer { } public void prepareTest(PhptSourceTestPack src_test_pack, FileSystemScenario fs_scenario) throws Exception { - if (!AzureWebsitesScenario.check(fs_scenario)) { + if (false /* TODO !AzureWebsitesScenario.check(fs_scenario) */) { if (test_case.containsSection(EPhptSection.FILE_EXTERNAL)) { // open external file and copy to test_file (binary, no char conversion - which could break it - often this is a PHAR file - which will be broken if charset coversion is done)