Skip to content

Commit

Permalink
build: use container runner for arm tests (#40932)
Browse files Browse the repository at this point in the history
* build: use aks arm64 test runners

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* build: better image

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* build: even more stuff

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* build: arm par

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* build: use aks arm32

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* build: arm32 par

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* build: get test timings from abs paths

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* build: avoid realpath, use echo

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* chore: fix contentTracing test

* cry

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: Samuel Attard <marshallofsound@electronjs.org>
  • Loading branch information
3 people committed Jan 10, 2024
1 parent ad0b24c commit b7a9bdc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
24 changes: 13 additions & 11 deletions .circleci/config/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ executors:
machine: true

linux-arm:
resource_class: electronjs/linux-arm
machine: true
resource_class: electronjs/aks-linux-arm-test
docker:
- image: ghcr.io/electron/test:arm32v7-8e0f85b708fa58e28e4824954d6fd55adfda5e9e

linux-arm64:
resource_class: electronjs/linux-arm64
machine: true
resource_class: electronjs/aks-linux-arm-test
docker:
- image: ghcr.io/electron/test:arm64v8-76d5d29e247972da3855a01c2d8cf72c5998233a

# The config expects the following environment variables to be set:
# - "SLACK_WEBHOOK" Slack hook URL to send notifications.
Expand Down Expand Up @@ -1656,17 +1658,15 @@ commands:
export LLVM_SYMBOLIZER_PATH=$PWD/third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer
export MOCHA_TIMEOUT=180000
echo "Piping output to ASAN_SYMBOLIZE ($ASAN_SYMBOLIZE)"
(cd electron && (circleci tests glob "spec/*-spec.ts" | circleci tests run --command="xargs node script/yarn test --runners=main --trace-uncaught --enable-logging --files" --split-by=timings 2>&1)) | $ASAN_SYMBOLIZE
(cd electron && (circleci tests glob "spec/*-spec.ts" | xargs -I@ -P4 bash -c "echo $(pwd)/@" | circleci tests run --command="xargs node script/yarn test --runners=main --trace-uncaught --enable-logging --files" --split-by=timings 2>&1)) | $ASAN_SYMBOLIZE
else
if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
export ELECTRON_SKIP_NATIVE_MODULE_TESTS=true
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging)
else
if [ "$TARGET_ARCH" == "ia32" ]; then
npm_config_arch=x64 node electron/node_modules/dugite/script/download-git.js
fi
(cd electron && (circleci tests glob "spec/*-spec.ts" | circleci tests run --command="xargs node script/yarn test --runners=main --trace-uncaught --enable-logging --files" --split-by=timings))
fi
if [ "$TARGET_ARCH" == "ia32" ]; then
npm_config_arch=x64 node electron/node_modules/dugite/script/download-git.js
fi
(cd electron && (circleci tests glob "spec/*-spec.ts" | xargs -I@ -P4 bash -c "echo $(pwd)/@" | circleci tests run --command="xargs node script/yarn test --runners=main --trace-uncaught --enable-logging --files" --split-by=timings))
fi
- store_test_results:
path: src/junit
Expand Down Expand Up @@ -2296,6 +2296,7 @@ jobs:
<<: *env-global
<<: *env-headless-testing
<<: *env-stack-dumping
parallelism: 3
steps:
- electron-tests:
artifact-key: linux-arm
Expand All @@ -2307,6 +2308,7 @@ jobs:
<<: *env-global
<<: *env-headless-testing
<<: *env-stack-dumping
parallelism: 3
steps:
- electron-tests:
artifact-key: linux-arm64
Expand Down
2 changes: 1 addition & 1 deletion spec/api-content-tracing-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ ifdescribe(!(['arm', 'arm64'].includes(process.arch)) || (process.platform !== '
// If the `categoryFilter` param above is not respected
// the file size will be above 50KB.
const fileSizeInKiloBytes = getFileSizeInKiloBytes(outputFilePath);
const expectedMaximumFileSize = 10; // Depends on a platform.
const expectedMaximumFileSize = 50; // Depends on a platform.

expect(fileSizeInKiloBytes).to.be.above(0,
`the trace output file is empty, check "${outputFilePath}"`);
Expand Down

0 comments on commit b7a9bdc

Please sign in to comment.