com pftt2: Fixes #59: Updated scripts to tests snapshots better: bin/PHP bin/auto_test_snap.cmd bin/get_qa.cmd bin/get_r elease.cmd bin/get_snapshot.cmd bin/pftt2_release .cmd bin/test_release.cmd

[email protected] (Christoph Michael Becker)
Newsgroups php.qa
Message-ID <[email protected]>
Commit:    1354c8c0f18ed9a49f3fd353d8a6f823131ea7b6
Author:    Allen Truong <[email protected]>         Fri, 30 Aug 2019 19:52:42 +0200
Committer: Christoph M. Becker <[email protected]>      Sun, 1 Sep 2019 14:08:12 +0200
Parents:   e4aaefd28d0e5a51645657593995768964d59f33
Branches:  master

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

Log:
Fixes #59: Updated scripts to tests snapshots better

Bugs:
https://bugs.php.net/59

Changed paths:
  M  bin/PHP
  M  bin/auto_test_snap.cmd
  M  bin/get_qa.cmd
  M  bin/get_release.cmd
  M  bin/get_snapshot.cmd
  M  bin/pftt2_release.cmd
  A  bin/test_release.cmd


Diff:
diff --git a/bin/PHP Snapshot Test.xml b/bin/PHP Snapshot Test.xml
index 7402724..b2e6dc4 100644
Binary files a/bin/PHP Snapshot Test.xml and b/bin/PHP Snapshot Test.xml differ
diff --git a/bin/auto_test_snap.cmd b/bin/auto_test_snap.cmd
index ff8b6e6..9485240 100644
--- a/bin/auto_test_snap.cmd
+++ b/bin/auto_test_snap.cmd
@@ -44,7 +44,7 @@ for /L %%i in (0,1,3) do (
 			REM If the build does not exist, fetch and test it
 			if not exist %PHP_BUILDS%\!build[%%j]! (
 				call %~dp0get_snapshot.cmd !branch! !thread[%%j]! !cpu[%%j]! !revision!
-				call %~dp0pftt.cmd core_list %PHP_BUILDS%\!build[%%j]! %PHP_BUILDS%\!test_pack[%%j]! %PFTT_HOME%\tests-to-run.txt
+				call %~dp0pftt.cmd -results_only core_list %PHP_BUILDS%\!build[%%j]! %PHP_BUILDS%\!test_pack[%%j]! %PFTT_HOME%\tests-to-run.txt
 			) else (
 				echo Build already exists: !build[%%j]!
 			)
diff --git a/bin/get_qa.cmd b/bin/get_qa.cmd
index 56f71b4..2a4d05d 100644
--- a/bin/get_qa.cmd
+++ b/bin/get_qa.cmd
@@ -44,16 +44,9 @@ set test_pack=php-test-pack-%branch%
 
 REM Add nts to file_name if needed
 if /I %build%==nts (
-	set file_name=%file_name%-nts
-)
-
-REM Set file_name based on parameters
-if not x%branch:7.2=%==x%branch% (
-	set file_name=%file_name%-win32-vc15-%cpu%
-) else if not x%branch:7.3=%==x%branch% (
+	set file_name=%file_name%-nts-win32-vc15-%cpu%
+) else (
 	set file_name=%file_name%-win32-vc15-%cpu%
-) else if not x%branch:7.4=%==x%branch% (
-	set file_name=%file_name%-win32-vs16-%cpu%
 )
 
 REM Download the build if it is not available
diff --git a/bin/get_release.cmd b/bin/get_release.cmd
index bcc74aa..5ef7349 100644
--- a/bin/get_release.cmd
+++ b/bin/get_release.cmd
@@ -50,12 +50,8 @@ if /I %build%==nts (
 REM Set file_name based on parameters
 if %branch%==7.1 (
 	set file_name=%file_name%-win32-vc14-%cpu%-latest
-) else if %branch%==7.2 (
-	set file_name=%file_name%-win32-vc15-%cpu%-latest
-) else if %branch%==7.3 (
+) else (
 	set file_name=%file_name%-win32-vc15-%cpu%-latest
-) else if %branch%==7.4 (
-	set file_name=%file_name%-win32-vs16-%cpu%-latest
 )
 
 REM Download the build if it is not available
diff --git a/bin/get_snapshot.cmd b/bin/get_snapshot.cmd
index a77cf4f..b2833b6 100644
--- a/bin/get_snapshot.cmd
+++ b/bin/get_snapshot.cmd
@@ -46,15 +46,9 @@ REM Set file_name and test_pack based on parameters
 if %branch%==7.1 (
 	set file_name=php-%branch%-%build%-windows-vc14-%cpu%
 	set test_pack=php-test-pack-%branch%-%build%-windows-vc14-%cpu%
-) else if %branch%==7.2 (
-	set file_name=php-%branch%-%build%-windows-vc15-%cpu%
-	set test_pack=php-test-pack-%branch%-%build%-windows-vc15-%cpu%
-) else if %branch%==7.3 (
+) else (
 	set file_name=php-%branch%-%build%-windows-vc15-%cpu%
 	set test_pack=php-test-pack-%branch%-%build%-windows-vc15-%cpu%
-) else if %branch%==7.4 (
-	set file_name=php-%branch%-%build%-windows-vs16-%cpu%
-	set test_pack=php-test-pack-%branch%-%build%-windows-vs16-%cpu%
 )
 
 if /i %revision%==latest call get_latest_revision.cmd
diff --git a/bin/pftt2_release.cmd b/bin/pftt2_release.cmd
index 78cbd3e..f3b3228 100644
--- a/bin/pftt2_release.cmd
+++ b/bin/pftt2_release.cmd
@@ -22,6 +22,8 @@ if exist %PFTT_BUILD% (
 	xcopy /s /i "%PFTT_BIN%" "%PFTT_RELEASE%\bin"
 	xcopy /s /i "%PFTT_CONF%" "%PFTT_RELEASE%\conf"
 	xcopy /s /i "%PFTT_LIB%" "%PFTT_RELEASE%\lib"
+	
+	copy "%PFTT_HOME%\tests-to-run.txt" "%PFTT_RELEASE%"
 
 	REM Create pftt2.jar in lib of the package
 	jar cf pftt2.jar -C %PFTT_BUILD% com %PFTT_BUILD%\org\columba %PFTT_BUILD%\org\kxml2 %PFTT_BUILD%\org\incava
diff --git a/bin/test_release.cmd b/bin/test_release.cmd
new file mode 100644
index 0000000..f862119
--- /dev/null
+++ b/bin/test_release.cmd
@@ -0,0 +1,55 @@
+@ECHO OFF 
+setlocal enabledelayedexpansion
+
+set branch=%1
+
+REM Check if parameters are set
+if %branch%.==. (
+	GOTO args_error
+) else (
+	GOTO set_env
+)
+
+
+:args_error
+echo User error: must specify branch
+echo test_release "<branch>"
+echo Branch can be any of: 7.1, 7.2, 7.3, 7.4
+exit /b
+
+:set_env
+REM set important env vars
+IF DEFINED PFTT_SHELL GOTO :skip_set_env
+CALL %~dp0set_env.cmd
+:skip_set_env
+
+SET cpu[0]=x64
+SET cpu[1]=x86
+SET cpu[2]=x64
+SET cpu[3]=x86
+SET thread[0]=NTS
+SET thread[1]=NTS
+SET thread[2]=TS
+SET thread[3]=TS
+set test_pack=php-test-pack-%branch%-latest
+
+SET PHP_BUILDS=%~d0\PHPBuilds
+
+if %branch%==7.1 (
+	set build=vc14
+) else (
+	set build=vc15
+)
+
+for /L %%j in (0,1,3) do (
+	call %~dp0get_release.cmd %branch% !thread[%%j]! !cpu[%%j]!
+	
+	if !thread[%%j]!==NTS (
+		set file_name=php-%branch%-!thread[%%j]!-win32-%build%-!cpu[%%j]!-latest
+	) else (
+		set file_name=php-%branch%-win32-%build%-!cpu[%%j]!-latest
+	)
+	
+	call %~dp0pftt.cmd -results_only core_list %PHP_BUILDS%\!file_name! %PHP_BUILDS%\%test_pack% %PFTT_HOME%\tests-to-run.txt
+	call %~dp0pftt.cmd -config opcache -results_only core_list %PHP_BUILDS%\!file_name! %PHP_BUILDS%\%test_pack% %PFTT_HOME%\tests-to-run.txt
+)
\ No newline at end of file
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.