- 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
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'
- 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
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:
- 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:
- 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
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.
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') {
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') {
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");
}
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) {