GHA/windows: enable HTTPS tests with stunnel
- install stunnel Closes #14488
This commit is contained in:
Родитель
4a0061697e
Коммит
bc72a78a11
|
@ -135,7 +135,7 @@ jobs:
|
|||
|
||||
- name: 'autotools run tests'
|
||||
if: ${{ matrix.build == 'autotools' && matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 12
|
||||
run: |
|
||||
export TFLAGS='-j14 ${{ matrix.tflags }}'
|
||||
if [ '${{ matrix.sys }}' != 'msys' ]; then
|
||||
|
@ -144,6 +144,8 @@ jobs:
|
|||
if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
|
||||
TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
|
||||
fi
|
||||
/c/ProgramData/chocolatey/choco.exe install --yes --no-progress --limit-output --timeout 180 stunnel --force
|
||||
PATH="$PATH:/c/Program Files (x86)/stunnel/bin"
|
||||
make -C bld -j5 V=1 test-ci
|
||||
|
||||
- name: 'cmake configure'
|
||||
|
@ -214,7 +216,7 @@ jobs:
|
|||
|
||||
- name: 'cmake run tests'
|
||||
if: ${{ matrix.build == 'cmake' && matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 12
|
||||
run: |
|
||||
export TFLAGS='-j14 ${{ matrix.tflags }}'
|
||||
if [ '${{ matrix.sys }}' != 'msys' ]; then
|
||||
|
@ -223,7 +225,8 @@ jobs:
|
|||
if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
|
||||
TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
|
||||
fi
|
||||
PATH="$PWD/bld/lib:$PATH"
|
||||
/c/ProgramData/chocolatey/choco.exe install --yes --no-progress --limit-output --timeout 180 stunnel --force
|
||||
PATH="$PWD/bld/lib:$PATH:/c/Program Files (x86)/stunnel/bin"
|
||||
cmake --build bld --config '${{ matrix.type }}' --target test-ci
|
||||
|
||||
old-mingw-w64:
|
||||
|
@ -331,14 +334,15 @@ jobs:
|
|||
|
||||
- name: 'cmake run tests'
|
||||
if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 12
|
||||
run: |
|
||||
PATH="$(cygpath "${USERPROFILE}")/my-cache/${{ matrix.dir }}/bin:/c/msys64/usr/bin:$PATH"
|
||||
export TFLAGS='-j14 ~TFTP ~MQTT ~WebSockets ~FTP ${{ matrix.tflags }}'
|
||||
if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
|
||||
TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
|
||||
fi
|
||||
PATH="$PWD/bld/lib:$PATH"
|
||||
/c/ProgramData/chocolatey/choco.exe install --yes --no-progress --limit-output --timeout 180 stunnel --force
|
||||
PATH="$PWD/bld/lib:$PATH:/c/Program Files (x86)/stunnel/bin"
|
||||
cmake --build bld --config '${{ matrix.type }}' --target test-ci
|
||||
|
||||
linux-cross-mingw-w64:
|
||||
|
@ -541,8 +545,13 @@ jobs:
|
|||
|
||||
- name: 'cmake run tests'
|
||||
if: ${{ matrix.tflags != 'skipall' && matrix.tflags != 'skiprun' }}
|
||||
timeout-minutes: 12
|
||||
timeout-minutes: 14
|
||||
run: |
|
||||
export TFLAGS='-j14 ~TFTP ~MQTT ~WebSockets ~SMTP ~FTP ${{ matrix.tflags }}'
|
||||
PATH="$PWD/bld/lib:$PATH"
|
||||
# GnuTLS is not fully functional on Windows, so skip the tests
|
||||
# https://github.com/ShiftMediaProject/gnutls/issues/23
|
||||
if [ '${{ matrix.name }}' != 'gnutls' ]; then
|
||||
/c/ProgramData/chocolatey/choco.exe install --yes --no-progress --limit-output --timeout 180 stunnel --force
|
||||
fi
|
||||
PATH="$PWD/bld/lib:$PATH:/c/Program Files (x86)/stunnel/bin"
|
||||
cmake --build bld --config '${{ matrix.type }}' --target test-ci
|
||||
|
|
|
@ -104,6 +104,22 @@ sub pidfromfile {
|
|||
return $pid;
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
# return Cygwin pid from virtual pid
|
||||
#
|
||||
sub winpid_to_pid {
|
||||
my $vpid = $_[0];
|
||||
if(($^O eq 'cygwin' || $^O eq 'msys') && $vpid > 65536) {
|
||||
my $pid = Cygwin::winpid_to_pid($vpid - 65536);
|
||||
if($pid) {
|
||||
return $pid;
|
||||
} else {
|
||||
return $vpid
|
||||
}
|
||||
}
|
||||
return $vpid;
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
# pidexists checks if a process with a given pid exists and is alive.
|
||||
# This will return the positive pid if the process exists and is alive.
|
||||
|
@ -115,6 +131,7 @@ sub pidexists {
|
|||
|
||||
if($pid > 0) {
|
||||
# verify if currently existing Windows process
|
||||
$pid = winpid_to_pid($pid);
|
||||
if ($pid > 65536 && os_is_win()) {
|
||||
$pid -= 65536;
|
||||
if($^O ne 'MSWin32') {
|
||||
|
@ -144,6 +161,7 @@ sub pidterm {
|
|||
|
||||
if($pid > 0) {
|
||||
# request the process to quit
|
||||
$pid = winpid_to_pid($pid);
|
||||
if ($pid > 65536 && os_is_win()) {
|
||||
$pid -= 65536;
|
||||
if($^O ne 'MSWin32') {
|
||||
|
@ -169,13 +187,14 @@ sub pidkill {
|
|||
|
||||
if($pid > 0) {
|
||||
# request the process to quit
|
||||
$pid = winpid_to_pid($pid);
|
||||
if ($pid > 65536 && os_is_win()) {
|
||||
$pid -= 65536;
|
||||
if($^O ne 'MSWin32') {
|
||||
my $filter = "PID eq $pid";
|
||||
my $result = `tasklist -fi \"$filter\" 2>nul`;
|
||||
if(index($result, "$pid") != -1) {
|
||||
system("taskkill -f -fi \"$filter\" >nul 2>&1");
|
||||
system("taskkill -f -t -fi \"$filter\" >nul 2>&1");
|
||||
# Windows XP Home compatibility
|
||||
system("tskill $pid >nul 2>&1");
|
||||
}
|
||||
|
@ -195,6 +214,7 @@ sub pidwait {
|
|||
my $pid = $_[0];
|
||||
my $flags = $_[1];
|
||||
|
||||
$pid = winpid_to_pid($pid);
|
||||
# check if the process exists
|
||||
if ($pid > 65536 && os_is_win()) {
|
||||
if($flags == &WNOHANG) {
|
||||
|
|
|
@ -501,18 +501,6 @@ sub stopserver {
|
|||
my $result = 0;
|
||||
foreach my $server (@killservers) {
|
||||
my $pidfile = $serverpidfile{$server};
|
||||
my $pid = processexists($pidfile);
|
||||
if($pid > 0) {
|
||||
if($err_unexpected) {
|
||||
logmsg "ERROR: ";
|
||||
$result = -1;
|
||||
}
|
||||
else {
|
||||
logmsg "Warning: ";
|
||||
}
|
||||
logmsg "$server server unexpectedly alive\n";
|
||||
killpid($verbose, $pid);
|
||||
}
|
||||
unlink($pidfile) if(-f $pidfile);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче