Skip to content

Commit a4ce9ef

Browse files
committed
Fix branch variable
1 parent 3ba4f77 commit a4ce9ef

File tree

4 files changed

+23
-8
lines changed

4 files changed

+23
-8
lines changed

.github/scripts/windows/build_task.bat

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ cmd /c configure.bat ^
6060
--with-php-build=%DEPS_DIR% ^
6161
%ADD_CONF% ^
6262
--disable-test-ini
63-
6463
if %errorlevel% neq 0 exit /b 3
6564

66-
nmake /NOLOGO /S
65+
nmake /NOLOGO
6766
if %errorlevel% neq 0 exit /b 3
6867

6968
exit /b 0
Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
11
@echo off
2+
SetLocal EnableDelayedExpansion
23

3-
for /f "usebackq tokens=3" %%i in (`findstr PHP_MAJOR_VERSION main\php_version.h`) do set BRANCH=%%i
4-
for /f "usebackq tokens=3" %%i in (`findstr PHP_MINOR_VERSION main\php_version.h`) do set BRANCH=%BRANCH%.%%i
4+
if /i "%APPVEYOR%" equ "True" (
5+
if /i "%APPVEYOR_REPO_BRANCH:~0,4%" equ "php-" (
6+
set BRANCH=%APPVEYOR_REPO_BRANCH:~4,3%
7+
) else (
8+
set BRANCH=master
9+
)
10+
) else (
11+
if "%GITHUB_BASE_REF%" equ "master" (
12+
set BRANCH=master
13+
) else (
14+
if "%GITHUB_HEAD_REF%" equ "master" (
15+
set BRANCH=master
16+
) else (
17+
for /f "usebackq tokens=3" %%i in (`findstr PHP_MAJOR_VERSION main\php_version.h`) do set BRANCH=%%i
18+
for /f "usebackq tokens=3" %%i in (`findstr PHP_MINOR_VERSION main\php_version.h`) do set BRANCH=!BRANCH!.%%i
19+
)
20+
)
21+
)
22+
echo !BRANCH!

.github/scripts/windows/test_task.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ mkdir c:\tests_tmp
119119

120120
set TEST_PHP_JUNIT=c:\junit.out.xml
121121

122-
nmake test TESTS="%OPCACHE_OPTS% -q --offline -g FAIL,BORK,WARN,LEAK,XLEAK --color --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp --bless %PARALLEL%"
122+
nmake test TESTS="%OPCACHE_OPTS% -q --offline --show-diff --show-slow 1000 --set-timeout 120 --temp-source c:\tests_tmp --temp-target c:\tests_tmp --bless %PARALLEL%"
123123

124124
set EXIT_CODE=%errorlevel%
125125

run-tests.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,9 +2781,7 @@ function run_test(string $php, $file, array $env): string
27812781
$orig_shortname = str_replace(TEST_PHP_SRCDIR . '/', '', $file);
27822782
$diff = "# original source file: $orig_shortname\n" . $diff;
27832783
}
2784-
if (!$SHOW_ONLY_GROUPS || array_intersect($restype, $SHOW_ONLY_GROUPS)) {
2785-
show_file_block('diff', $diff);
2786-
}
2784+
show_file_block('diff', $diff);
27872785
if (strpos($log_format, 'D') !== false && file_put_contents($diff_filename, $diff) === false) {
27882786
error("Cannot create test diff - $diff_filename");
27892787
}

0 commit comments

Comments
 (0)