CI Automation/windows10 aarch64: Difference between revisions
(Updated section) |
(Overhauled page) |
||
Line 15: | Line 15: | ||
== Hosting == | == Hosting == | ||
Currently an array of | Currently an array of ~30 machines are hosted at [https://bitbar.com/ Bitbar] in the United States. | ||
= Setup = | = Setup - local environment = | ||
Developers wishing to run tests locally have two methods. | |||
== Prequisites == | |||
# download and install [https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-2.2.0.exe Mozilla-Build 2.2.0] | |||
== Using mozilla-build == | |||
This method uses a script to download test archives in order to run tests locally. | |||
# download <code>script for running mozhanress on Yoga</code> from [https://bugzilla.mozilla.org/show_bug.cgi?id=1520867 bug 1520867] | |||
# place the test runner script in the <code>C:\mozilla-build</code> directory | |||
# place the script in the mozilla-build directory | # from treeherder, identify a changeset that containes a successful <code>build-win64-aarch64/opt</code> | ||
# copy the task ID | # copy the task ID of the build | ||
# invoke start-shell.bat, which will launch a bash-like command line | # invoke start-shell.bat, which will launch a bash-like command line | ||
# from mozilla-build directory, run the test runner script as follows: | # from mozilla-build directory, run the test runner script as follows: | ||
<code>bash script.sh task_id test_type <chunk_to_run> <total_chunks></code> | |||
Example: | Example: | ||
<code>bash script.sh Q-CE8DFvSAWmc08vw6bd6A xpcshell 1 8</code> | |||
=== | === Using mozilla-central === | ||
This method is taken from [https://www.gijsk.com/blog/2019/02/getting-firefox-artifact-builds-working-on-an-arm64-aarch64-windows-device/ this guide]. | This method is taken from [https://www.gijsk.com/blog/2019/02/getting-firefox-artifact-builds-working-on-an-arm64-aarch64-windows-device/ this guide] and uses mozilla-central with a build artifact. | ||
# invoke start-shell.bat, which will launch a bash-like command line | # invoke start-shell.bat, which will launch a bash-like command line | ||
# clone the repository | # clone the repository using <code>hg clone https://hg.mozilla.org/mozilla-central/</code> | ||
# run ./mach bootstrap and pick artifact build | # run </code>./mach bootstrap</code> and pick artifact build | ||
# download python3 | # download python3 embeddable zip, then extract to <code>mozilla-build/</code> directory | ||
# | # remove [https://searchfox.org/mozilla-central/rev/152993fa346c8fd9296e4cd6622234a664f53341/python/mozboot/mozboot/bootstrap.py#444 this line] | ||
# download 32bit NodeJS zip and extract to .mozbuild/node | # download 32bit NodeJS zip and extract to <code>.mozbuild/node</code> | ||
# inside mozilla-build, remove watchman | # inside mozilla-build, remove the directory named <code>watchman</code> | ||
# | # rerun <code>./mach bootstrap</code> | ||
# run <code>./mach build</code> | |||
After the artifact build succeeds, it is possible to run most suites of tests as normal: | After the artifact build succeeds, it is possible to run most suites of tests as normal: | ||
<code>./mach mochitest <test_file></code> | |||
= CI environment = | |||
Tests that are run in Taskcluster environment against windows10-aarch64 execute using [https://github.com/taskcluster/generic-worker Taskcluster Generic-Worker]. These are installed as a service on via [https://github.com/mozilla-releng/OpenCloudConfig OpenCloudConfig]. | Tests that are run in Taskcluster environment against windows10-aarch64 execute using [https://github.com/taskcluster/generic-worker Taskcluster Generic-Worker]. These are installed as a service on via [https://github.com/mozilla-releng/OpenCloudConfig OpenCloudConfig]. | ||
== | == Using OpenCloudConfig == | ||
This is the method used in production. | This is the method used in production. | ||
Line 71: | Line 69: | ||
Invoke-Expression (New-Object Net.WebClient).DownloadString(('https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/{0}/userdata/rundsc.ps1?{1}' -f $gitBranchOrRef, [Guid]::NewGuid())) | Invoke-Expression (New-Object Net.WebClient).DownloadString(('https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/{0}/userdata/rundsc.ps1?{1}' -f $gitBranchOrRef, [Guid]::NewGuid())) | ||
== Manually install Generic-Worker [Not recommended] == | |||
Follow these step to install Taskcluster Generic-Worker on the hardware, and have it launch as a service. | Follow these step to install Taskcluster Generic-Worker on the hardware, and have it launch as a service. | ||
Line 116: | Line 114: | ||
= Currently Running = | = Currently Running = | ||
Currently | Currently, all tests are running regularly on <code>mozilla-central</code> and <code>try</code>. | ||
= Run on try = | |||
= Run | |||
This is probably what you came to the document for. How to run tests against the windows10-aarch64 hardware currently available. | This is probably what you came to the document for. How to run tests against the windows10-aarch64 hardware currently available. | ||
''' | '''Hardware is limited so please exercise caution when scheduling tests! A careless try will block many others. Only schedule jobs that are absolutely necessary.''' | ||
== Prerequisites == | |||
* try access (commit access level 1) | * try access (commit access level 1) | ||
* up-to-date mozilla-central codebase | * up-to-date mozilla-central codebase | ||
== Steps == | |||
Note that on <code>try</code>, windows10-aarch64 is hidden by default; please use <code>./mach try fuzzy --full</code> to schedule jobs. | |||
# | # <code>./mach try fuzzy --full</code> | ||
# select tests that need to be run (e.g. 'windows10-aarch64 xpcshell') | # select tests that need to be run (e.g. 'windows10-aarch64 xpcshell') | ||
# enter | # enter | ||
Tests will appear in Treeherder under the heading '' | Tests will appear in Treeherder under the heading ''Windows 10 AArch64 opt''. | ||
= Greening tests = | = Greening tests = |
Revision as of 02:23, 24 August 2019
Overview
Since mid-January 2019 the CI-A team has been working to enable existing test harnesses, continuous integration tests and other tools to run on Windows 10 ARM64.
General Information
Hardware
- Make: Lenovo
- Model: C630 YOGA
- Processor: Qualcomm Snapdragon 850 3.0GHz
- Cores: 8
- Memory: 8GB
- Disk: 128GB SSD
Hosting
Currently an array of ~30 machines are hosted at Bitbar in the United States.
Setup - local environment
Developers wishing to run tests locally have two methods.
Prequisites
- download and install Mozilla-Build 2.2.0
Using mozilla-build
This method uses a script to download test archives in order to run tests locally.
- download
script for running mozhanress on Yoga
from bug 1520867 - place the test runner script in the
C:\mozilla-build
directory - from treeherder, identify a changeset that containes a successful
build-win64-aarch64/opt
- copy the task ID of the build
- invoke start-shell.bat, which will launch a bash-like command line
- from mozilla-build directory, run the test runner script as follows:
bash script.sh task_id test_type <chunk_to_run> <total_chunks>
Example:
bash script.sh Q-CE8DFvSAWmc08vw6bd6A xpcshell 1 8
Using mozilla-central
This method is taken from this guide and uses mozilla-central with a build artifact.
- invoke start-shell.bat, which will launch a bash-like command line
- clone the repository using
hg clone https://hg.mozilla.org/mozilla-central/
- run ./mach bootstrap and pick artifact build
- download python3 embeddable zip, then extract to
mozilla-build/
directory - remove this line
- download 32bit NodeJS zip and extract to
.mozbuild/node
- inside mozilla-build, remove the directory named
watchman
- rerun
./mach bootstrap
- run
./mach build
After the artifact build succeeds, it is possible to run most suites of tests as normal:
./mach mochitest <test_file>
CI environment
Tests that are run in Taskcluster environment against windows10-aarch64 execute using Taskcluster Generic-Worker. These are installed as a service on via OpenCloudConfig.
Using OpenCloudConfig
This is the method used in production.
Steps originally taken from 1520432.
$gitBranchOrRef = 'master' Invoke-Expression (New-Object Net.WebClient).DownloadString(('https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/{0}/userdata/rundsc.ps1?{1}' -f $gitBranchOrRef, [Guid]::NewGuid()))
Manually install Generic-Worker [Not recommended]
Follow these step to install Taskcluster Generic-Worker on the hardware, and have it launch as a service.
Instruction originally from 1522997.
Prerequisites
- disable Windows S mode
- disable User Account Control
- disable Windows Firewall
- download NSSM to C:\nssm-2.24\
- create "Remote Desktop Users" group:
net localgroup "Remote Desktop Users" /add
- log in to Taskcluster
- request scope `assume:project:taskcluster:generic-worker-tester`
Steps
- download the current 386 release of `generic-worker-windows-386.exe` from taskcluster generic-worker.
- download the latest 386 version of livelog.exe and taskcluster-proxy.exe.
- create new directory C:\generic-worker.
- move the three executable files under C:\generic-worker.
- rename generic-worker-windows-386.exe to generic-worker.exe.
- generate two signing keys:
generic-worker new-openpgp-keypair --file <unique_file_name> generic-worker new-ed25519-keypair --file <unique_file_name>
- create generic-worker.config and include the following:
"accessToken": "<access token tied to taskcluster>", "clientId": "<client ID tied to taskcluster>", "ed25519SigningKeyLocation": "<file location you wrote ed25519 private key in step 6>", "livelogSecret": "<any text>", "provisionerId": "test-provisioner", "publicIP": "<ideally an IP address of one of your network interfaces>", "rootURL": "https://taskcluster.net", "workerGroup": "test-worker-group", "workerId": "test-worker-id", "workerType": "<a unique string that only you will use for your test worker(s)>"
- launch cmd.exe with Administrator rights.
- cd c:\generic-worker
- generic-worker.exe install service --config generic-worker.config --nssm c:\nssm-2.24\win32\nssm.exe
- reboot once installed.
- launch cmd.exe with Administrator rights.
- sc query "Generic Worker"
Currently Running
Currently, all tests are running regularly on mozilla-central
and try
.
Run on try
This is probably what you came to the document for. How to run tests against the windows10-aarch64 hardware currently available.
Hardware is limited so please exercise caution when scheduling tests! A careless try will block many others. Only schedule jobs that are absolutely necessary.
Prerequisites
- try access (commit access level 1)
- up-to-date mozilla-central codebase
Steps
Note that on try
, windows10-aarch64 is hidden by default; please use ./mach try fuzzy --full
to schedule jobs.
./mach try fuzzy --full
- select tests that need to be run (e.g. 'windows10-aarch64 xpcshell')
- enter
Tests will appear in Treeherder under the heading Windows 10 AArch64 opt.
Greening tests
Since Windows on ARM64 is a new platform/architecture combination, failures unique to this combination is to be expected. It will be necessary to fix, correct or update the tests in order to obtain a green run.
Example 1
As part of 1525743, the timeout for mochitest-browser-chrome was extended to 4x the default value if the platform combination of Windows and ARM64 is detected.
See change: https://phabricator.services.mozilla.com/D19882
This change greened the test that was previously failing due to a timeout.
Example 2
Some tests provide a manifest file in the form of <test_category>.ini, such as mochitest.ini.
For bug 1525665 it was determined to disable a certain a11y test while windows10-aarch64 a11y support was being investigated.
See change: https://phabricator.services.mozilla.com/D22363
This change meant the failing test is now disabled for windows10-aarch64, and the test would have been green had it not been for another failure elsewhere.
Example 3
Another example of manipulating the manifest of a category of tests, this time with web-platform-tests.
For Bug 1533912 the manifest was modified to disable the test if it was running on aarch64 hardware.
See change: https://phabricator.services.mozilla.com/D23003
Note that web-platform-tests use a slightly different format in order.
Example 4
Certain test cases in reftest/crashtest/jsreftest had unexpected outcomes on windows10-aarch64.
For Bug 1536365 and 1536363 the requirement was to adjust the pixel difference values such that tests will pass.
See change: https://phabricator.services.mozilla.com/D25113
Bugs
These are the top-level tracking bugs; the recommended view is tree (login required).
32 Total; 5 Open (15.63%); 27 Resolved (84.38%); 0 Verified (0%);