Commit:    11a7bbacf7db647c13c9bc6aae3fb5478fa82d45
Author:    Dale Hirt <daleh...@microsoft.com>         Thu, 9 Jan 2020 16:41:21 
+0100
Committer: Christoph M. Becker <cmbecke...@gmx.de>      Mon, 20 Jan 2020 
11:55:22 +0100
Parents:   b54b82fd6a2283f1059d171812c31465343871cd
Branches:  master

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

Log:
Add test_snap.cmd

This creates a script that allows for individual branch snapshot testing.

The changes to auto_test_snap.cmd just make it call the new test_snap.cmd file 
with each branch.

Changed paths:
  M  bin/auto_test_snap.cmd
  M  bin/test_qa.cmd
  M  bin/test_release.cmd
  A  bin/test_snap.cmd


Diff:
diff --git a/bin/auto_test_snap.cmd b/bin/auto_test_snap.cmd
index 96d037ed..b00581e9 100644
--- a/bin/auto_test_snap.cmd
+++ b/bin/auto_test_snap.cmd
@@ -1,53 +1,5 @@
-@ECHO OFF 
-setlocal enabledelayedexpansion
+SET branches=7.2 7.3 7.4
 
-REM set important env vars
-IF DEFINED PFTT_SHELL GOTO :skip_set_env
-CALL %~dp0set_env.cmd
-:skip_set_env
-
-if not exist %PHP_BUILDS% (
-       md %PHP_BUILDS%
-)
-
-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]=vc15
-
-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 -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]!
-                       )
-               )
-       ) else (
-               echo No new build available.
-       )
+for %%i in (%branches%) do (
+       call %~dp0test_snap.cmd %%i
 )
\ No newline at end of file
diff --git a/bin/test_qa.cmd b/bin/test_qa.cmd
index e4163821..782572a9 100644
--- a/bin/test_qa.cmd
+++ b/bin/test_qa.cmd
@@ -23,6 +23,10 @@ IF DEFINED PFTT_SHELL GOTO :skip_set_env
 CALL %~dp0set_env.cmd
 :skip_set_env
 
+if not exist %PHP_BUILDS% (
+       md %PHP_BUILDS%
+)
+
 SET cpu[0]=x64
 SET cpu[1]=x86
 SET cpu[2]=x64
@@ -33,6 +37,8 @@ SET thread[2]=TS
 SET thread[3]=TS
 set test_pack=php-test-pack-%branch%
 
+set build=vc15
+
 for /L %%j in (0,1,3) do (
        call %~dp0get_qa.cmd %branch% !thread[%%j]! !cpu[%%j]!
        
diff --git a/bin/test_release.cmd b/bin/test_release.cmd
index c53ba5b7..9ade0643 100644
--- a/bin/test_release.cmd
+++ b/bin/test_release.cmd
@@ -23,6 +23,10 @@ IF DEFINED PFTT_SHELL GOTO :skip_set_env
 CALL %~dp0set_env.cmd
 :skip_set_env
 
+if not exist %PHP_BUILDS% (
+       md %PHP_BUILDS%
+)
+
 SET cpu[0]=x64
 SET cpu[1]=x86
 SET cpu[2]=x64
@@ -33,11 +37,7 @@ SET thread[2]=TS
 SET thread[3]=TS
 set test_pack=php-test-pack-%branch%-latest
 
-if %branch%==7.1 (
-       set build=vc14
-) else (
-       set build=vc15
-)
+set build=vc15
 
 for /L %%j in (0,1,3) do (
        call %~dp0get_release.cmd %branch% !thread[%%j]! !cpu[%%j]!
diff --git a/bin/test_snap.cmd b/bin/test_snap.cmd
new file mode 100644
index 00000000..855c5ed1
--- /dev/null
+++ b/bin/test_snap.cmd
@@ -0,0 +1,57 @@
+@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_snap "<branch>"
+echo Branch can be any of: 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
+
+if not exist %PHP_BUILDS% (
+       md %PHP_BUILDS%
+)
+
+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 build=vc15
+
+SET revision=latest
+CALL %~dp0get_latest_revision.cmd
+
+REM Only run next part if revision is not null, otherwise skip
+if [!revision!]==[] (
+       echo No new build available.
+       exit /b
+)
+
+for /L %%j in (0,1,3) do (
+       SET 
package[%%j]=php-!branch!-!thread[%%j]!-windows-!build!-!cpu[%%j]!-!revision!
+       SET 
test_pack[%%j]=php-test-pack-!branch!-!thread[%%j]!-windows-!build!-!cpu[%%j]!-!revision!
+       
+       call %~dp0get_snapshot.cmd !branch! !thread[%%j]! !cpu[%%j]! !revision!
+       call %~dp0pftt.cmd -results_only core_list %PHP_BUILDS%\!package[%%j]! 
%PHP_BUILDS%\!test_pack[%%j]! %PFTT_HOME%\tests-to-run.txt
+)

Reply via email to