Commit: e5dc373c81c823988df92042e5121b1be613d4d6
Author: Matt Ficken <v-maf...@microsoft.com> Tue, 16 Jul 2013
16:20:46 -0700
Parents: a839e18932f354c1e8766c88d039b6ae8f45007b
Branches: master
Link:
http://git.php.net/?p=pftt2.git;a=commitdiff;h=e5dc373c81c823988df92042e5121b1be613d4d6
Log:
new NSIS based installer for Windows
Changed paths:
M LICENSE.txt
M bin/pftt_auto.cmd
A cache/dep/MySQL/Windows/mysql-installer-community-5.6.10.1.msi
D cache/dep/MySQL/mysql-installer-community-5.6.10.1.msi
D script/install/isetup-5.5.3.exe
D script/install/pftt.iss
A script/install/windows/PFTT-Windows.nsi
M src/com/mostc/pftt/host/CommonCommandManager.java
M src/com/mostc/pftt/host/LocalHost.java
M src/com/mostc/pftt/main/PfttMain.java
M src/com/mostc/pftt/model/core/PhptTestCase.java
M src/com/mostc/pftt/results/PhptTestResult.java
M src/com/mostc/pftt/runner/AbstractPhptTestCaseRunner2.java
M src/com/mostc/pftt/scenario/SAPIScenario.java
M src/com/mostc/pftt/scenario/WebServerScenario.java
diff --git a/LICENSE.txt b/LICENSE.txt
index d4f05f1..1fc853b 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,3 +1,5 @@
+BSD-3 Clause License
+
Copyright (c) 2012, Microsoft Corporation
All rights reserved.
diff --git a/bin/pftt_auto.cmd b/bin/pftt_auto.cmd
index 83344b9..9ebe9ca 100644
--- a/bin/pftt_auto.cmd
+++ b/bin/pftt_auto.cmd
@@ -5,7 +5,7 @@ REM set important env vars
CALL \php-sdk\PFTT\current\bin\set_env
SET PFTT_LIB=%PFTT_HOME%\lib
-SET
CLASSPATH=%PFTT_HOME%\build;%PFTT_LIB%\mysql-connector-java-5.1.25-bin.jar;%PFTT_LIB%\apache-mime4j-0.6.jar;%PFTT_LIB%\commons-exec-1.1.jar;%PFTT_LIB%\cssparser-0.9.8.jar;%PFTT_LIB%\guava-14.0.jar;%PFTT_LIB%\hamcrest-core-1.3.jar;%PFTT_LIB%\httpclient-4.2.1.jar;%PFTT_LIB%\httpcore-4.2.1.jar;%PFTT_LIB%\httpmime-4.2.1.jar;%PFTT_LIB%\jna-3.4.0.jar;%PFTT_LIB%\jna-platform-3.4.0.jar;%PFTT_LIB%\json-20080701.jar;%PFTT_LIB%\jzlib-1.1.1.jar;%PFTT_LIB%\nekohtml-1.9.17.jar;%PFTT_LIB%\phantomjsdriver-1.0.1.jar;%PFTT_LIB%\selenium-java-2.31.0.jar;%PFTT_LIB%\htmlcleaner-2.2.jar;%PFTT_LIB%\groovy-1.8.6.jar;%PFTT_LIB%\icu4j-49_1.jar;%PFTT_LIB%\icudata.jar;%PFTT_LIB%\icutzdata.jar;%PFTT_LIB%\jansi-1.7.jar;%PFTT_LIB%\jline-0.9.94.jar;%PFTT_LIB%\xercesImpl.jar;%PFTT_LIB%\xmlpull-1.1.3.1.jar;%PFTT_LIB%\commons-cli-1.2.jar;%PFTT_LIB%\antlr-2.7.7.jar;%PFTT_LIB%\asm-3.2.jar;%PFTT_LIB%\asm-analysis-3.2.jar;%PFTT_LIB%\asm-commons-3.2.jar;%PFTT_LIB%\asm-tree-3.2.jar;%PFTT_LIB%\asm-util-3.2.jar;%PFTT_LIB%\winp-1.14.jar;%PFTT_LIB%\commons-net-3.1.jar;%PFTT_LIB%\commons-codec-1.6.jar;%PFTT_LIB%\commons-lang-2.6.jar;%PFTT_LIB%\commons-logging-1.1.1.jar;%PFTT_LIB%\jzlib-1.1.1.jar;%PFTT_LIB%\mina-core-2.0.7.jar;%PFTT_LIB%\mina-statemachine-2.0.7.jar;%PFTT_LIB%\slf4j-api-1.7.2.jar;%PFTT_LIB%\slf4j-log4j12-1.7.2.jar;%PFTT_LIB%\php_parser.jar;%PFTT_LIB%\log4j-1.2.17.jar
+SET
CLASSPATH=%PFTT_HOME%\build;%PFTT_LIB%\javax.servlet.jar;%PFTT_LIB%\mysql-connector-java-5.1.25-bin.jar;%PFTT_LIB%\apache-mime4j-0.6.jar;%PFTT_LIB%\commons-exec-1.1.jar;%PFTT_LIB%\cssparser-0.9.8.jar;%PFTT_LIB%\guava-14.0.jar;%PFTT_LIB%\hamcrest-core-1.3.jar;%PFTT_LIB%\httpclient-4.2.1.jar;%PFTT_LIB%\httpcore-4.2.1.jar;%PFTT_LIB%\httpmime-4.2.1.jar;%PFTT_LIB%\jna-3.4.0.jar;%PFTT_LIB%\jna-platform-3.4.0.jar;%PFTT_LIB%\json-20080701.jar;%PFTT_LIB%\jzlib-1.1.1.jar;%PFTT_LIB%\nekohtml-1.9.17.jar;%PFTT_LIB%\phantomjsdriver-1.0.1.jar;%PFTT_LIB%\selenium-java-2.31.0.jar;%PFTT_LIB%\htmlcleaner-2.2.jar;%PFTT_LIB%\groovy-1.8.6.jar;%PFTT_LIB%\icu4j-49_1.jar;%PFTT_LIB%\icudata.jar;%PFTT_LIB%\icutzdata.jar;%PFTT_LIB%\jansi-1.7.jar;%PFTT_LIB%\jline-0.9.94.jar;%PFTT_LIB%\xercesImpl.jar;%PFTT_LIB%\xmlpull-1.1.3.1.jar;%PFTT_LIB%\commons-cli-1.2.jar;%PFTT_LIB%\antlr-2.7.7.jar;%PFTT_LIB%\asm-3.2.jar;%PFTT_LIB%\asm-analysis-3.2.jar;%PFTT_LIB%\asm-commons-3.2.jar;%PFTT_LIB%\asm-tree-3.2.jar;%PFTT_LIB%\asm-util-3.2.jar;%PFTT_LIB%\winp-1.14.jar;%PFTT_LIB%\commons-net-3.1.jar;%PFTT_LIB%\commons-codec-1.6.jar;%PFTT_LIB%\commons-lang-2.6.jar;%PFTT_LIB%\commons-logging-1.1.1.jar;%PFTT_LIB%\jzlib-1.1.1.jar;%PFTT_LIB%\mina-core-2.0.7.jar;%PFTT_LIB%\mina-statemachine-2.0.7.jar;%PFTT_LIB%\slf4j-api-1.7.2.jar;%PFTT_LIB%\slf4j-log4j12-1.7.2.jar;%PFTT_LIB%\php_parser.jar;%PFTT_LIB%\log4j-1.2.17.jar
REM if user added -uac or -auto or -debug* console options, run elevated in UAC
diff --git a/cache/dep/MySQL/Windows/mysql-installer-community-5.6.10.1.msi
b/cache/dep/MySQL/Windows/mysql-installer-community-5.6.10.1.msi
new file mode 100644
index 0000000..1c85be8
Binary files /dev/null and
b/cache/dep/MySQL/Windows/mysql-installer-community-5.6.10.1.msi differ
diff --git a/cache/dep/MySQL/mysql-installer-community-5.6.10.1.msi
b/cache/dep/MySQL/mysql-installer-community-5.6.10.1.msi
deleted file mode 100644
index 1c85be8..0000000
Binary files a/cache/dep/MySQL/mysql-installer-community-5.6.10.1.msi and
/dev/null differ
diff --git a/script/install/isetup-5.5.3.exe b/script/install/isetup-5.5.3.exe
deleted file mode 100644
index f0a39b1..0000000
Binary files a/script/install/isetup-5.5.3.exe and /dev/null differ
diff --git a/script/install/pftt.iss b/script/install/pftt.iss
deleted file mode 100644
index 0c9df30..0000000
--- a/script/install/pftt.iss
+++ /dev/null
@@ -1,34 +0,0 @@
-;http://www.jrsoftware.org/ishelp/
-[Setup]
-AppName=PFTT
-AppVersion=0.5
-DefaultDirName=C:\php-sdk\PFTT\current
-; TODO additional metadata
-DefaultGroupName=PFTT
-;UninstallDisplayIcon={app}\MyProg.exe
-Compression=lzma2
-SolidCompression=yes
-OutputDir=C:\php-sdk\PFTT\current\scripts\install\windows
-DirExistsWarning=no
-CreateAppDir=yes
-; Require at least Windows 6.0 (Vista+)
-MinVersion=6.0
-
-[Files]
-;
http://stackoverflow.com/questions/10645269/inno-setup-exclude-a-directory-and-its-files-also
-; TODO excludes doesn't work
-; TODO exclude files in root of c:\php-sdk\pftt\current
-Source: "C:\php-sdk\PFTT\current\*"; Excludes: ".git"; DestDir: "{app}";
Flags: ignoreversion recursesubdirs createallsubdirs;
-Source: "C:\php-sdk\PFTT\current\*"; Excludes: "src"; DestDir: "{app}"; Flags:
ignoreversion recursesubdirs createallsubdirs;
-Source: "C:\php-sdk\PFTT\current\*"; Excludes: "cache\working"; DestDir:
"{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
-Source: "C:\php-sdk\PFTT\current\*"; Excludes: ".settings"; DestDir: "{app}";
Flags: ignoreversion recursesubdirs createallsubdirs;
-Source: "C:\php-sdk\PFTT\current\*"; Excludes: "scripts\install"; DestDir:
"{app}"; Flags: ignoreversion recursesubdirs createallsubdirs;
-
-; TODO don't include `jre` folder on non-windows
-; TODO start menu entry
-
-;[Icons]
-;Name: "{group}\My Program"; Filename: "{app}\MyProg.exe"
-
-;[Run]
-;Filename: "{app}\bin\PFTT Shell.LNK"; Parameters: "/nowait"
diff --git a/script/install/windows/PFTT-Windows.nsi
b/script/install/windows/PFTT-Windows.nsi
new file mode 100644
index 0000000..914d9ee
--- /dev/null
+++ b/script/install/windows/PFTT-Windows.nsi
@@ -0,0 +1,128 @@
+Name "PFTT"
+
+OutFile "\php-sdk\PFTT\PFTT-Windows-x86-VERSION.exe"
+
+RequestExecutionLevel admin
+XPStyle on
+
+# meta-data
+VIAddVersionKey /LANG=1033-English "ProductName" "PFTT"
+VIAddVersionKey /LANG=1033-English "Comments" "Full Coverage test tool for the
PHP Ecosystem"
+VIAddVersionKey /LANG=1033-English "CompanyName" "Microsoft"
+VIAddVersionKey /LANG=1033-English "LegalCopyright" "� 2013 Microsoft Open
Source Technology Center"
+VIAddVersionKey /LANG=1033-English "FileDescription" "Full Coverage test tool
for the PHP Ecosystem"
+VIAddVersionKey /LANG=1033-English "FileVersion" "1.2.3.4"
+VIProductVersion "1.2.3.4"
+
+# see http://nsis.sourceforge.net/Docs/Chapter4.html
+ShowInstDetails show
+ShowUnInstDetails show
+SetCompressor /SOLID lzma
+SetCompressorDictSize 30
+SetDateSave off
+SetOverwrite on
+AllowSkipFiles off
+
+# ask user to accept the license
+Page license
+LicenseData \php-sdk\PFTT\current\LICENSE.txt
+
+# value will be replaced in onInit
+InstallDir ""
+
+Function .onInit
+ # check Windows version
+ ReadRegStr $R4 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion"
CurrentVersion
+ # $R4 will be 6.0 6.1 6.2
+ # check that it starts with 6
+ StrCpy $R3 $R4 1 0
+ StrCmp $R3 '6' windows_ok
+ MessageBox MB_OK "Only Windows 6.x is supported (upgrade to Windows
Vista+/7/8/2012/2008r2, etc...)"
+ Quit
+
+ windows_ok:
+
+
+ # get %SYSTEMDRIVE% (should be an NSIS constant like %WINDIR% but its
not)
+ ReadEnvStr $R5 SYSTEMDRIVE
+
+ # InstallDir is a compile-time directive, but can replace it at
run-time like so
+ StrCpy $INSTDIR "$R5\php-sdk\PFTT\current"
+FunctionEnd
+
+# comment this line out: do NOT ask user to confirm install directory (go with
the $INSTDIR value calculated in .onInit)
+# Page directory
+
+# ask user to confirm start menu entries
+Page custom StartMenuGroupSelect "" ": Start Menu Folder"
+Function StartMenuGroupSelect
+ Push $R1
+
+ StartMenu::Select /checknoshortcuts "Don't create a start menu folder"
/autoadd /lastused $R0 "PFTT"
+ Pop $R1
+
+ StrCmp $R1 "success" success
+ StrCmp $R1 "cancel" done
+ ; error
+ MessageBox MB_OK $R1
+ StrCpy $R0 "PFTT Install Cancelled" # use default
+ Return
+ success:
+ Pop $R0
+
+ done:
+ Pop $R1
+FunctionEnd
+
+# install files and set registry entries
+Page instfiles
+# TODO
+Section
+ SetOutPath $INSTDIR
+ # TODO must manually delete script\install\Windows\*.exe
+ # TODO must manually move conf\internal bin\internal cache\working\*
+ # NOTE for some reason .git is skipped here already for some reason
+ File /r /x *.git* /x *conf\internal* /x *bin\internal* /x
*cache\working* /x *scripts\install* \php-sdk\PFTT\current\*
+
+ WriteUninstaller $INSTDIR\uninstaller.exe
+
+ # add entry to `Programs & Features` page in Control Panel
+ WriteRegStr HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\PFTT" "DisplayName" "PFTT"
+ WriteRegStr HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\PFTT" "InstallLocation"
"$INSTDIR"
+ WriteRegStr HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\PFTT" "Publisher"
"Microsoft Open Source Technology Center"
+ WriteRegStr HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\PFTT" "UninstallString"
"$INSTDIR\uninstaller.exe"
+SectionEnd
+Section
+ # this part is only necessary if you used /checknoshortcuts
+ StrCpy $R1 $R0 1
+ StrCmp $R1 ">" skip
+ # run this block if not /checknoshortcuts
+
+ SetShellVarContext All
+ CreateDirectory "$SMPROGRAMS\$R0"
+ CreateShortCut "$SMPROGRAMS\$R0\PFTT Shell.lnk"
"$INSTDIR\BIN\PFTT Shell.lnk"
+ CreateShortCut "$SMPROGRAMS\$R0\PFTT Documentation.lnk"
"$INSTDIR\DOC"
+ CreateShortCut "$SMPROGRAMS\$R0\PHP on Windows.lnk"
"http://windows.php.net/"
+ CreateShortCut "$SMPROGRAMS\$R0\PHP Bugs.lnk"
"http://bugs.php.net/"
+ CreateShortCut "$SMPROGRAMS\$R0\PFTT Homepage.lnk"
"http://github.com/OSTC/PFTT2/"
+ CreateShortCut "$SMPROGRAMS\$R0\Uninstall PFTT.lnk"
"$INSTDIR\uninstaller"
+ skip:
+SectionEnd
+
+# prompt user to run the PFTT shell when installation is finished (so user
gets started/engaged quickly)
+Function .onInstSuccess
+ MessageBox MB_YESNO "PFTT is installed.$\r$\n$\r$\nRun PFTT Shell?"
IDNO NoPFTTShell
+ ExecShell "open" "$INSTDIR\BIN\PFTT Shell.lnk" SW_SHOWMAXIMIZED
+ NoPFTTShell:
+FunctionEnd
+
+# confirm uninstalling PFTT
+UninstPage uninstConfirm
+
+# delete files and registry key
+UninstPage instfiles
+Section "Uninstall"
+ # remove from `Programs & Features` page in Control Panel
+ DeleteRegKey HKLM
"Software\Microsoft\Windows\CurrentVersion\Uninstall\PFTT"
+ Delete $INSTDIR
+SectionEnd
diff --git a/src/com/mostc/pftt/host/CommonCommandManager.java
b/src/com/mostc/pftt/host/CommonCommandManager.java
index b6f3469..d94c475 100644
--- a/src/com/mostc/pftt/host/CommonCommandManager.java
+++ b/src/com/mostc/pftt/host/CommonCommandManager.java
@@ -21,7 +21,7 @@ public class CommonCommandManager {
win_close_all_handles_lock.tryLock(10,
TimeUnit.SECONDS);
} catch ( InterruptedException ex ) {}
try {
- handle_out = host.execOut("handle -accepteula
-p "+process_id+" -a", 10);
+ handle_out =
host.execOut(host.getPfttDir()+"\\bin\\handle -accepteula -p "+process_id+"
-a", 10);
} finally {
try {
win_close_all_handles_lock.unlock();
@@ -34,7 +34,7 @@ public class CommonCommandManager {
String handle_type = h_part[1];
if (handle_id.endsWith(":") &&
handle_type.equalsIgnoreCase("File")) {
handle_id =
handle_id.substring(0, handle_id.length()-1);
- String handle_cmd = "handle
-accepteula -p "+process_id+" -y -c "+handle_id;
+ String handle_cmd =
host.getPfttDir()+"\\bin\\handle -accepteula -p "+process_id+" -y -c
"+handle_id;
try {
win_close_all_handles_lock.tryLock(10, TimeUnit.SECONDS);
} catch ( InterruptedException
ex ) {}
@@ -70,7 +70,7 @@ public class CommonCommandManager {
win_kill_process_lock.tryLock(5,
TimeUnit.SECONDS);
} catch ( InterruptedException ex ) {}
try {
- host.exec("pskill -accepteula -t -p
"+process_id, 20);
+
host.exec(host.getPfttDir()+"\\bin\\pskill -accepteula -t -p "+process_id, 20);
//host.exec("TASKKILL /FI \"IMAGENAME
eq "+image_name+"\" /FI \"PID eq "+process_id+"\" /F /T", 20);
} finally {
try {
@@ -82,7 +82,7 @@ public class CommonCommandManager {
win_kill_process_lock.tryLock(5,
TimeUnit.SECONDS);
} catch ( InterruptedException ex ) {}
try {
- host.exec("pskill -accepteula -t -p
"+process_id, 20);
+
host.exec(host.getPfttDir()+"\\bin\\pskill -accepteula -t -p "+process_id, 20);
//host.exec("TASKKILL /FI \"IMAGENAME
eq "+image_name+"\" /FI \"PID eq "+process_id+"\" /F /T", 20);
} finally {
try {
diff --git a/src/com/mostc/pftt/host/LocalHost.java
b/src/com/mostc/pftt/host/LocalHost.java
index cbd35f5..6cbd3c7 100644
--- a/src/com/mostc/pftt/host/LocalHost.java
+++ b/src/com/mostc/pftt/host/LocalHost.java
@@ -281,6 +281,12 @@ public class LocalHost extends AHost {
return System.getProperty("user.name");
}
+ protected static final UncaughtExceptionHandler
IGNORE_EXCEPTION_HANDLER = new UncaughtExceptionHandler () {
+ @Override
+ public void uncaughtException(Thread arg0, Throwable
arg1) {
+ // ignore, do nothing
+ }
+ };
public class LocalExecHandle extends ExecHandle {
protected int exit_code = 0;
protected final AtomicReference<Process> process;
@@ -326,7 +332,11 @@ public class LocalHost extends AHost {
final Process p = this.process.get();
if (p==null)
return;
+ // @see #exec_copy_lines
run.set(false);
+ synchronized(run) {
+ run.notifyAll();
+ }
// sometimes it can take a while to #close a
process(especially on Windows)... do it in a thread
// to avoid blocking for too long. however, we don't
want to have too many threads
@@ -466,7 +476,7 @@ public class LocalHost extends AHost {
close_thread_set.remove(calling_thread);
}
synchronized(tlock) {
- tlock.notifyAll();
+ tlock.notifyAll();
}
// encourage JVM to free up the
Windows process handle (may have problems if too many are left open too long)
@@ -536,7 +546,49 @@ public class LocalHost extends AHost {
System.gc();
} // end protected void run
- protected void exec_copy_lines(StringBuilder sb, InputStream
in, Charset charset) throws IOException {
+ @SuppressWarnings("deprecation")
+ protected void exec_copy_lines(final StringBuilder sb, final
InputStream in, final Charset charset) throws IOException {
+ if (isWindows()) {
+ final AtomicBoolean copy_thread_lock = new
AtomicBoolean(true);
+ Thread copy_thread = new Thread() {
+ public void run() {
+ try {
+
do_exec_copy_lines(sb, in, charset);
+
copy_thread_lock.set(false);
+
synchronized(run) {
+
run.notifyAll();
+ }
+ } catch (IOException e)
{
+ // TODO
Auto-generated catch block
+
e.printStackTrace();
+ }
+ }
+ };
+
copy_thread.setName("Copy"+copy_thread.getName());
+ copy_thread.setDaemon(true);
+
copy_thread.setUncaughtExceptionHandler(IGNORE_EXCEPTION_HANDLER);
+ copy_thread.start();
+ while (true) {
+ synchronized(run) {
+ try {
+ run.wait();
+ } catch ( InterruptedException
ex ) {}
+ }
+ if (!copy_thread_lock.get()) {
+ // stopped normally
+ break;
+ } else if (!run.get()) {
+ // try killing copy thread
since its still running after it was supposed to stop
+ copy_thread.stop(new
RuntimeException());
+ break;
+ }
+ }
+ } else {
+ do_exec_copy_lines(sb, in, charset);
+ }
+ }
+
+ protected void do_exec_copy_lines(StringBuilder sb, InputStream
in, Charset charset) throws IOException {
DefaultCharsetDeciderDecoder d = charset == null ? null
: PhptTestCase.newCharsetDeciderDecoder();
ByLineReader reader = charset == null ? new
NoCharsetByLineReader(new java.io.BufferedInputStream(in)) : new
MultiCharsetByLineReader(in, d);
String line;
diff --git a/src/com/mostc/pftt/main/PfttMain.java
b/src/com/mostc/pftt/main/PfttMain.java
index a202c69..9eea7ce 100644
--- a/src/com/mostc/pftt/main/PfttMain.java
+++ b/src/com/mostc/pftt/main/PfttMain.java
@@ -78,13 +78,23 @@ import
com.mostc.pftt.util.WindowsSnapshotDownloadUtil.FindBuildTestPackPair;
// real unattended (automated) testing that actually works
// the php test tool that you'd actually want to use
// doesn't resort to brittle shell scripts
+//
+// useful to test the whole stack you're running your application on
+// -test the php build
+// -test the web server build
+//
/* -rename ostcpftt@ name to `OSTC PFTT Unattended Test System`
-name still clear who owns it
-plus database field would tell
-only `php` is missing from new name, but any 2nd/3rd party who saw the
name wouldn't care about that
-just care about owner*/
+// TODO enchant scenario
+// skips on 5.4 cli apache ts
+// skips on 5.5 cli apache ts
// TODO new nsis based installer for windows
+// -works, but need to exclude some directories
+// -improve documentation, improve instructions
// TODO linux apache support
// TODO linux .sh installer
// TODO iis support
@@ -93,6 +103,16 @@ import
com.mostc.pftt.util.WindowsSnapshotDownloadUtil.FindBuildTestPackPair;
// so php cli and apache on linux can be compared to windows
// for any windows specific memory problems, etc...
// TODO -debug_all -debugger gdb
+// TODO use multiple phpt test-packs
+// -in same result-pack
+// -don't change PHPT report form though
+// -for console-args
+// TODO get custom DLL from custom test-pack
+// TODO mssql scenario
+// -for both `sql server` and `azure sql`?
+// -supply mssql binary using console args (custom_ext task)
+// -or include in pftt's cache/dep
+// -use mssql PHPTs as a separate PhptTestPack until they are integrated
with PhpCore
// TODO xdebug only for 5.4-ts
// TODO task/code_coverage store in result-pack
// TODO get code coverage data of Symfony demo app (UI?)
diff --git a/src/com/mostc/pftt/model/core/PhptTestCase.java
b/src/com/mostc/pftt/model/core/PhptTestCase.java
index f7c01d1..4b47f14 100644
--- a/src/com/mostc/pftt/model/core/PhptTestCase.java
+++ b/src/com/mostc/pftt/model/core/PhptTestCase.java
@@ -1020,7 +1020,7 @@ public class PhptTestCase extends TestCase {
"tests/basic/022.phpt",
};
/** SPEC: PHPT tests are given 60 seconds to execute. If they have not
finished by then,
- * they are killed and whatever output (if any) they returned is used
to evalute for PASS/FAIL.
+ * they are killed and whatever output (if any) they returned is used
to evaluate for PASS/FAIL.
*
* Note: tests reach their time limit and EXPECT no output will
probably PASS (unless they CRASH)
* because they probably returned no output.
diff --git a/src/com/mostc/pftt/results/PhptTestResult.java
b/src/com/mostc/pftt/results/PhptTestResult.java
index 242913a..7e88713 100644
--- a/src/com/mostc/pftt/results/PhptTestResult.java
+++ b/src/com/mostc/pftt/results/PhptTestResult.java
@@ -250,7 +250,7 @@ public class PhptTestResult implements ISerializer {
// TODO serial.attribute(null, "host", host.getName());
// normally only need the rest of the information if the test
failed
- if (include_all) {
+ if (true) {// TODO include_all) {
if (StringUtil.isNotEmpty(actual)) {
serial.startTag(null, "actual");
diff --git a/src/com/mostc/pftt/runner/AbstractPhptTestCaseRunner2.java
b/src/com/mostc/pftt/runner/AbstractPhptTestCaseRunner2.java
index 5d17317..c5180be 100644
--- a/src/com/mostc/pftt/runner/AbstractPhptTestCaseRunner2.java
+++ b/src/com/mostc/pftt/runner/AbstractPhptTestCaseRunner2.java
@@ -452,7 +452,7 @@ public abstract class AbstractPhptTestCaseRunner2 extends
AbstractPhptTestCaseRu
}
if (expected_re_match) {
- twriter.addResult(host, scenario_set,
notifyPassOrXFail(new PhptTestResult(host,
test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, null)));
+ twriter.addResult(host, scenario_set,
notifyPassOrXFail(new PhptTestResult(host,
test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, preoverride_actual, getSAPIOutput(),
getSAPIConfig())));
return;
}
@@ -465,7 +465,7 @@ public abstract class AbstractPhptTestCaseRunner2 extends
AbstractPhptTestCaseRu
}
if (expected_re_match) {
- twriter.addResult(host, scenario_set,
notifyPassOrXFail(new PhptTestResult(host,
test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, null)));
+ twriter.addResult(host, scenario_set,
notifyPassOrXFail(new PhptTestResult(host,
test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, preoverride_actual, getSAPIOutput(),
getSAPIConfig())));
return;
}
@@ -488,7 +488,7 @@ public abstract class AbstractPhptTestCaseRunner2 extends
AbstractPhptTestCaseRu
}
if (expected_re_match) {
- twriter.addResult(host, scenario_set,
notifyPassOrXFail(new PhptTestResult(host,
test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, null)));
+ twriter.addResult(host, scenario_set,
notifyPassOrXFail(new PhptTestResult(host,
test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, preoverride_actual, getSAPIOutput(),
getSAPIConfig())));
return;
}
@@ -501,7 +501,7 @@ public abstract class AbstractPhptTestCaseRunner2 extends
AbstractPhptTestCaseRu
}
if (expected_re_match) {
- twriter.addResult(host,
scenario_set, notifyPassOrXFail(new PhptTestResult(host,
test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, null)));
+ twriter.addResult(host,
scenario_set, notifyPassOrXFail(new PhptTestResult(host,
test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, preoverride_actual, getSAPIOutput(),
getSAPIConfig())));
return;
}
@@ -531,7 +531,7 @@ public abstract class AbstractPhptTestCaseRunner2 extends
AbstractPhptTestCaseRu
// compare again
if (equalsNoWS(output, expected)) {
- twriter.addResult(host, scenario_set,
notifyPassOrXFail(new PhptTestResult(host,
test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, null)));
+ twriter.addResult(host, scenario_set,
notifyPassOrXFail(new PhptTestResult(host,
test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, preoverride_actual, getSAPIOutput(),
getSAPIConfig())));
return;
} // end if
@@ -541,7 +541,7 @@ public abstract class AbstractPhptTestCaseRunner2 extends
AbstractPhptTestCaseRu
String output_trim = output.trim();
if
(StringUtil.isEmpty(output_trim)||(output.contains("<html>")&&!output.contains("404")))
{
- twriter.addResult(host, scenario_set,
notifyPassOrXFail(new PhptTestResult(host,
test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, null)));
+ twriter.addResult(host, scenario_set,
notifyPassOrXFail(new PhptTestResult(host,
test_case.isXFail()?EPhptTestStatus.XFAIL:EPhptTestStatus.PASS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, preoverride_actual, getSAPIOutput(),
getSAPIConfig())));
return;
}
@@ -564,7 +564,7 @@ public abstract class AbstractPhptTestCaseRunner2 extends
AbstractPhptTestCaseRu
PhptTestResult result;
if (test_case.isXFail()) {
- result = notifyNotPass(new PhptTestResult(host,
is_timeout?EPhptTestStatus.TIMEOUT:EPhptTestStatus.XFAIL_WORKS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, preoverride_actual));
+ result = notifyNotPass(new PhptTestResult(host,
is_timeout?EPhptTestStatus.TIMEOUT:EPhptTestStatus.XFAIL_WORKS, test_case,
output, null, null, charset, ini, env, splitCmdString(), stdin_post,
getShellScript(), null, null, preoverride_actual, getSAPIOutput(),
getSAPIConfig()));
} else {
result = notifyNotPass(notifyFail(new
PhptTestResult(host, is_timeout?EPhptTestStatus.TIMEOUT:EPhptTestStatus.FAIL,
test_case, output, actual_lines, expected_lines, charset, ini, env,
splitCmdString(), stdin_post, getShellScript(), diff, expectf,
preoverride_actual, getSAPIOutput(), getSAPIConfig())));
}
diff --git a/src/com/mostc/pftt/scenario/SAPIScenario.java
b/src/com/mostc/pftt/scenario/SAPIScenario.java
index e345992..575a8e7 100644
--- a/src/com/mostc/pftt/scenario/SAPIScenario.java
+++ b/src/com/mostc/pftt/scenario/SAPIScenario.java
@@ -154,6 +154,7 @@ public abstract class SAPIScenario extends
AbstractSerialScenario {
"ext/intl/tests/rbbiter_getbinaryrules_basic.phpt",
"ext/intl/tests/rbbiter_getrules_basic.phpt",
"ext/mbstring/tests/mb_ereg_replace-compat-03.phpt",
+ "ext/iconv/tests/ob_iconv_handler.phpt",
"sapi/cli/tests/cli_process_title_windows.phpt",
"ext/mbstring/tests/ini_language.phpt",
"ext/mbstring/tests/mb_parse_str02.phpt",
diff --git a/src/com/mostc/pftt/scenario/WebServerScenario.java
b/src/com/mostc/pftt/scenario/WebServerScenario.java
index a79417c..a37bbed 100644
--- a/src/com/mostc/pftt/scenario/WebServerScenario.java
+++ b/src/com/mostc/pftt/scenario/WebServerScenario.java
@@ -225,7 +225,6 @@ public abstract class WebServerScenario extends
SAPIScenario {
"ext/standard/tests/strings/004.phpt",
"ext/mbstring/tests/bug63447_001.phpt",
"ext/mbstring/tests/bug63447_002.phpt",
- "ext/iconv/tests/ob_iconv_handler.phpt",
"ext/mbstring/tests/mb_strcut.phpt",
"ext/mbstring/tests/mb_decode_numericentity.phpt",
//////////////////
--
PHP Quality Assurance Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php