try to track down which tests trigger hang

This commit is contained in:
John Kleinschmidt
2024-11-19 17:56:16 -05:00
parent f5430b4a69
commit 07298d6ffe

View File

@@ -50,7 +50,7 @@ jobs:
fail-fast: false
matrix:
build-type: ${{ inputs.target-platform == 'macos' && fromJSON('["darwin","mas"]') || (inputs.target-platform == 'windows' && fromJSON('["windows"]') || fromJSON('["linux"]')) }}
shard: ${{ inputs.target-platform == 'linux' && fromJSON('[1, 2, 3]') || fromJSON('[1, 2]') }}
shard: ${{ inputs.target-platform != 'macos' && fromJSON('[1, 2, 3, 4]') || fromJSON('[1, 2]') }}
env:
BUILD_TYPE: ${{ matrix.build-type }}
TARGET_ARCH: ${{ inputs.target-arch }}
@@ -191,7 +191,7 @@ jobs:
cd src/electron
export ELECTRON_TEST_RESULTS_DIR=`pwd`/junit
# Get which tests are on this shard
tests_files=$(node script/split-tests ${{ matrix.shard }} ${{ inputs.target-platform == 'macos' && 2 || 3 }})
tests_files=$(node script/split-tests ${{ matrix.shard }} ${{ inputs.target-platform == 'macos' && 2 || 4 }})
# Run tests
if [ "`uname`" = "Darwin" ]; then
@@ -225,7 +225,15 @@ jobs:
cd src\electron
echo ELECTRON_TEST_RESULTS_DIR=$PWD\junit >> $env:GITHUB_ENV
# Get which tests are on this shard
$tests_files=node script\split-tests ${{ matrix.shard }} 2
if ('${{ matrix.shard }}' -eq '1') {
$tests_files='spec\api-web-contents-spec.ts spec\webview-spec.ts spec\api-ipc-spec.ts spec\api-native-image-spec.ts spec\api-menu-item-spec.ts'
} elseif ('${{ matrix.shard }}' -eq '2') {
$tests_files='spec\webview-spec.ts spec\api-ipc-spec.ts spec\api-native-image-spec.ts spec\api-menu-item-spec.ts'
} elseif ('${{ matrix.shard }}' -eq '3') {
$tests_files='spec\api-web-contents-spec.ts spec\api-ipc-spec.ts spec\api-native-image-spec.ts spec\api-menu-item-spec.ts'
} elseif ('${{ matrix.shard }}' -eq '4') {
$tests_files='spec\api-web-contents-spec.ts spec\webview-spec.ts spec\api-native-image-spec.ts spec\api-menu-item-spec.ts'
}
echo tests_files="$tests_files" >> $env:GITHUB_ENV
if ('${{ inputs.target-arch }}' -eq 'x86') {
echo npm_config_arch=ia32 >> $env:GITHUB_ENV