com pftt2: Fixes #55: Automation Part 2: bin/PHP bin/auto_tes t_snap.cmd bin/get_qa.cmd bin/get_release.cmd bin/get_snapshot.cmd
bin/pftt2_release.cmd tes ts-to-run.txt
| From: | Christoph Michael Becker | Date: | Sat, 27 Jul 2019 09:10:04 +0000 |
| Subject: | com pftt2: Fixes #55: Automation Part 2: bin/PHP bin/auto_tes t_snap.cmd bin/get_qa.cmd bin/get_release.cmd bin/get_snapshot.cmd bin/pftt2_release.cmd tes ts-to-run.txt |
||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-68619@lists.php.net to get a copy of this message | ||
Commit: 848cc83c9bd1aef3fba651961d049afa16c28964
Author: Allen Truong <v-altruo@microsoft.com> Fri, 26 Jul 2019 17:23:44 -0700
Committer: Christoph M. Becker <cmbecker69@gmx.de> Sat, 27 Jul 2019 11:10:04 +0200
Parents: fbf6589a25163f8ea175a3820a9858a145f1995c
Branches: master
Link: http://git.php.net/?p=pftt2.git;a=commitdiff;h=848cc83c9bd1aef3fba651961d049afa16c28964
Log:
Fixes #55: Automation Part 2
Bugs:
https://bugs.php.net/55
Changed paths:
A bin/PHP
A 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 tests-to-run.txt
Diff:
diff --git a/bin/PHP Snapshot Test.xml b/bin/PHP Snapshot Test.xml
new file mode 100644
index 0000000..7402724
Binary files /dev/null and b/bin/PHP Snapshot Test.xml differ
diff --git a/bin/auto_test_snap.cmd b/bin/auto_test_snap.cmd
new file mode 100644
index 0000000..ec80e51
--- /dev/null
+++ b/bin/auto_test_snap.cmd
@@ -0,0 +1,55 @@
+@ECHO OFF
+setlocal enabledelayedexpansion
+
+REM set important env vars
+IF DEFINED PFTT_SHELL GOTO :skip_set_env
+CALL %~dp0set_env.cmd
+:skip_set_env
+
+SET PHP_BUILDS=%~d0\PHPBuilds
+
+if not exist %PHP_BUILDS% (
+ md %~d0\PHPBuilds
+)
+
+SET branch[0]=7.1
+SET branch[1]=7.2
+SET branch[2]=7.3
+SET branch[3]=7.4
+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 vc[0]=vc14
+SET vc[1]=vc15
+SET vc[2]=vc15
+SET vc[3]=vs16
+
+REM Check php-7.1 for new snap builds
+for /L %%i in (0,1,3) do (
+ SET branch=!branch[%%i]!
+ SET revision=latest
+ CALL %~dp0get_latest_revision.cmd
+
+ REM Only run next part if revision is not null, otherwise skip
+ if not [!revision!]==[] (
+ for /L %%j in (0,1,3) do (
+ SET build[%%j]=php-!branch!-!thread[%%j]!-windows-!vc[%%i]!-!cpu[%%j]!-!revision!
+ SET test_pack[%%j]=php-test-pack-!branch!-!thread[%%j]!-windows-!vc[%%i]!-!cpu[%%j]!-!revision!
+
+ 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
+ ) else (
+ echo Build already exists: !build[%%j]!
+ )
+ )
+ ) else (
+ echo No new build available.
+ )
+)
\ No newline at end of file
diff --git a/bin/get_qa.cmd b/bin/get_qa.cmd
index 3a75601..56f71b4 100644
--- a/bin/get_qa.cmd
+++ b/bin/get_qa.cmd
@@ -16,7 +16,7 @@ if %cpu%.==. (
:args_error
echo User error: must specify branch, build type, CPU arch and revision code
-echo get_release "<branch> <build> <cpu>"
+echo get_qa "<branch> <build> <cpu>"
echo Branch can be any of: 7.2.XRCX, 7.3.XRCX, 7.4.XRCX
echo Build can be any of: NTS, TS
echo CPU can be any of: X64, X86
@@ -35,6 +35,10 @@ if not exist %PHP_BUILDS% (
md %~d0\PHPBuilds
)
+if not exist %PFTT_CACHE% (
+ md %PFTT_HOME%\cache
+)
+
set file_name=php-%branch%
set test_pack=php-test-pack-%branch%
diff --git a/bin/get_release.cmd b/bin/get_release.cmd
index 53b7f30..bcc74aa 100644
--- a/bin/get_release.cmd
+++ b/bin/get_release.cmd
@@ -35,6 +35,10 @@ if not exist %PHP_BUILDS% (
md %~d0\PHPBuilds
)
+if not exist %PFTT_CACHE% (
+ md %PFTT_HOME%\cache
+)
+
set file_name=php-%branch%
set test_pack=php-test-pack-%branch%-latest
diff --git a/bin/get_snapshot.cmd b/bin/get_snapshot.cmd
index 10fafab..a77cf4f 100644
--- a/bin/get_snapshot.cmd
+++ b/bin/get_snapshot.cmd
@@ -38,6 +38,10 @@ if not exist %PHP_BUILDS% (
md %~d0\PHPBuilds
)
+if not exist %PFTT_CACHE% (
+ md %PFTT_HOME%\cache
+)
+
REM Set file_name and test_pack based on parameters
if %branch%==7.1 (
set file_name=php-%branch%-%build%-windows-vc14-%cpu%
@@ -62,7 +66,7 @@ REM Download the build if it is not available
if not exist %PHP_BUILDS%\%file_name% (
set build_link=https://windows.php.net/downloads/snaps/php-%branch%/%revision%/%file_name%.zip
- bitsadmin /transfer DownloadingSnapBuild /download /priority high !build_link!
%PFTT_CACHE%\%file_name%.zip
+ bitsadmin /transfer DownloadingSnap-%branch%-%build%-%cpu%-Build /download /priority high
!build_link! %PFTT_CACHE%\%file_name%.zip
7za.exe x %PFTT_CACHE%\%file_name%.zip -o%PHP_BUILDS%\*
del %PFTT_CACHE%\%file_name%.zip
) else (
@@ -73,7 +77,7 @@ REM Also download test-pack if it is not available
if not exist %PHP_BUILDS%\%test_pack% (
set test_pack_link=https://windows.php.net/downloads/snaps/php-%branch%/%revision%/%test_pack%.zip
- bitsadmin /transfer DownloadingSnapTestPack /download /priority high !test_pack_link!
%PFTT_CACHE%\%test_pack%.zip
+ bitsadmin /transfer DownloadingSnap-%branch%-%build%-%cpu%-TestPack /download /priority high
!test_pack_link! %PFTT_CACHE%\%test_pack%.zip
7za.exe x %PFTT_CACHE%\%test_pack%.zip -o%PHP_BUILDS%\*
del %PFTT_CACHE%\%test_pack%.zip
) else (
diff --git a/bin/pftt2_release.cmd b/bin/pftt2_release.cmd
index bb3db72..78cbd3e 100644
--- a/bin/pftt2_release.cmd
+++ b/bin/pftt2_release.cmd
@@ -7,12 +7,12 @@ CALL %~dp0set_env.cmd
SET PFTT_LIB=%PFTT_HOME%\lib
SET PFTT_BUILD=%PFTT_HOME%\build
-SET PFTT_RELEASE=%PFTT_HOME%\pftt_release
+SET PFTT_RELEASE=%PFTT_HOME%\pftt2
REM Check if build directory exists
if exist %PFTT_BUILD% (
REM Create pftt_release directory in main folder
- md %PFTT_HOME%\pftt_release
+ md %PFTT_HOME%\pftt2
REM Copy contents of bin, conf and lib to respective folders
md %PFTT_RELEASE%\bin
@@ -28,10 +28,10 @@ if exist %PFTT_BUILD% (
MOVE pftt2.jar %PFTT_RELEASE%\lib
REM Create zip file of pftt_release folder
- %PFTT_BIN%\7za.exe a -tzip %PFTT_HOME%\pftt_release.zip %PFTT_HOME%\pftt_release
+ %PFTT_BIN%\7za.exe a -tzip %PFTT_HOME%\pftt_release.zip %PFTT_HOME%\pftt2
REM Delete temp files/folders
- rd /s /q %PFTT_HOME%\pftt_release
+ rd /s /q %PFTT_HOME%\pftt2
) else (
ECHO Build folder does not exist
)
diff --git a/tests-to-run.txt b/tests-to-run.txt
new file mode 100644
index 0000000..65795a3
--- /dev/null
+++ b/tests-to-run.txt
@@ -0,0 +1,39 @@
+Zend\tests
+tests\basic
+tests\classes
+tests\func
+tests\lang
+tests\output
+tests\run-tests
+tests\security
+tests\strings
+ext\com_dotnet
+ext\curl
+ext\date
+ext\dom
+ext\hash
+ext\intl
+ext\json
+ext\libxml
+ext\mbstring
+ext\mysqli
+ext\opcache
+ext\openssl
+ext\pcre
+ext\pdo_mysql
+ext\pdo_sqlite
+ext\phar
+ext\reflection
+ext\session
+ext\simplexml
+ext\soap
+ext\spl
+ext\sqlite3
+ext\standard
+ext\xml
+ext\xmlreader
+ext\xmlwriter
+ext\zip
+ext\zlib
+Sapi\cgi
+Sapi\cli