Skip to content

Commit 93afb5c

Browse files
committed
Speed up the tests and xfail some more.
This closes #753 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1938094 13f79535-47bb-0310-9956-ffa450edef68
1 parent 26d2cdc commit 93afb5c

5 files changed

Lines changed: 32 additions & 6 deletions

File tree

‎.github/workflows/windows.yml‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ jobs:
4444
matrix:
4545
include:
4646
- name: Default
47-
triplet: x64-windows
47+
triplet: x64-windows-release
4848
arch: x64
4949
build-type: Release
5050
generator: "Ninja"
5151

5252
runs-on: windows-latest
53-
timeout-minutes: 60
53+
timeout-minutes: 40
5454
name: ${{ matrix.name }}
5555
env:
5656
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
@@ -78,14 +78,18 @@ jobs:
7878
- name: Configure CMake
7979
run: |
8080
cmake --version
81-
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} `
81+
cmake -B ${{github.workspace}}/build `
8282
-G "${{ matrix.generator }}" `
83+
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} `
8384
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake `
85+
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} `
8486
-DAPR_INCLUDE_DIR=C:/vcpkg/installed/${{ matrix.triplet }}/include `
8587
"-DAPR_LIBRARIES=C:/vcpkg/installed/${{ matrix.triplet }}/lib/libapr-1.lib;C:/vcpkg/installed/${{ matrix.triplet }}/lib/libaprutil-1.lib" `
8688
-DNGHTTP2_INCLUDE_DIR=C:/vcpkg/installed/${{ matrix.triplet }}/include `
8789
-DNGHTTP2_LIBRARIES=C:/vcpkg/installed/${{ matrix.triplet }}/lib/nghttp2.lib `
90+
-DJANSSON_INCLUDE_DIR=C:/vcpkg/installed/${{ matrix.triplet }}/include `
8891
-DJANSSON_LIBRARIES=C:/vcpkg/installed/${{ matrix.triplet }}/lib/jansson.lib `
92+
-DENABLE_MIME_MAGIC=A `
8993
-DBUILD_TEST_MODULES=true
9094
9195
- name: Build
@@ -96,7 +100,7 @@ jobs:
96100
run: |
97101
cmake --install ${{github.workspace}}/build --config ${{ matrix.build-type }}
98102
99-
- name: Install dependencies
103+
- name: Install Tools for tests
100104
env:
101105
VCPKG_DIR: C:\vcpkg
102106
VCPKG_TRIPLET: ${{ matrix.triplet }}

‎test/conftest.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ def _package_scope(env, request):
187187
"AH00337",
188188
"AH00338",
189189
"AH00341",
190+
"AH02322",
190191
])
191192
if sys.platform == "win32" and _has_ipv6():
192193
env.httpd_error_log.add_ignored_lognos(["AH00332"])

‎test/modules/core/test_008_restart.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import sys
2+
13
import pytest
24

35
from pyhttpd.conf import HttpdConf
@@ -47,6 +49,9 @@ def test_core_008_02_ungraceful(self, env):
4749
assert env.read_pid_file() == pid, "the restart replaced the parent"
4850
self.get(env, "after an ungraceful restart")
4951

52+
@pytest.mark.xfail(sys.platform == "win32", reason=
53+
"mpm_winnt restart does not wait for child exit, "
54+
"rapid restarts cause AH02322 socket errors")
5055
def test_core_008_03_repeated(self, env):
5156
"""Restarting twice in a row is no different from once."""
5257
for _ in range(2):

‎test/pyhttpd/install_tools.bat‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,16 @@ if not exist "%PREFIX%\bin\httpd.exe" (
3535

3636
rem --- python detection and install --------------------------------------------
3737
set PYTHON=
38-
for /f "delims=" %%D in ('dir /b /o-n "%LOCALAPPDATA%\Programs\Python\Python3*" 2^>nul') do (
39-
if not defined PYTHON set "PYTHON=%LOCALAPPDATA%\Programs\Python\%%D\python.exe"
38+
for /f "delims=" %%P in ('where python.exe 2^>nul') do (
39+
if not defined PYTHON (
40+
echo %%P | findstr /i "hostedtoolcache" >nul
41+
if not errorlevel 1 set "PYTHON=%%P"
42+
)
43+
)
44+
if not defined PYTHON (
45+
for /f "delims=" %%D in ('dir /b /o-n "%LOCALAPPDATA%\Programs\Python\Python3*" 2^>nul') do (
46+
if not defined PYTHON set "PYTHON=%LOCALAPPDATA%\Programs\Python\%%D\python.exe"
47+
)
4048
)
4149
if not defined PYTHON (
4250
for /f "delims=" %%D in ('dir /b /o-n "%PROGRAMFILES%\Python3*" 2^>nul') do (

‎test/pyhttpd/runtests.bat‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ if "%HERE:~-1%"=="\" set "HERE=%HERE:~0,-1%"
2525
rem --- python location: find the newest native Windows Python 3.x -------------
2626
if not defined PYTHON (
2727
set PYTHON=
28+
for /f "delims=" %%P in ('where python.exe 2^>nul') do (
29+
if not defined PYTHON (
30+
echo %%P | findstr /i "hostedtoolcache" >nul
31+
if not errorlevel 1 set "PYTHON=%%P"
32+
)
33+
)
34+
)
35+
if not defined PYTHON (
2836
for /f "delims=" %%D in ('dir /b /o-n "%LOCALAPPDATA%\Programs\Python\Python3*" 2^>nul') do (
2937
if not defined PYTHON set "PYTHON=%LOCALAPPDATA%\Programs\Python\%%D\python.exe"
3038
)

0 commit comments

Comments
 (0)