CI Automation/windows10 aarch64: Difference between revisions

(→‎Currently Running: - next steps)
 
(29 intermediate revisions by 4 users not shown)
Line 1: Line 1:
=Overview=
=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.
Since mid-January 2019 the [https://wiki.mozilla.org/CI_Automation CI-A team] has been working to enable existing test harnesses, continuous integration tests and other tools to run on Windows 10 ARM64, aka aarch64.


= General Information =
= General Information =
Line 15: Line 15:
== Hosting ==
== Hosting ==


Currently an array of 9 machines are hosted at [https://bitbar.com/ Bitbar] in the United States.
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.


Tests that are run against windows10-aarch64 execute using [https://github.com/taskcluster/generic-worker Taskcluster Generic-Worker]. These are installed as a service on the Windows 10 ARM64 manually or via [https://github.com/mozilla-releng/OpenCloudConfig OpenCloudConfig].
== Prequisites ==


A brief walkthrough of the steps to have Taskcluster Generic-Worker running on Windows 10 ARM64 will be provided.
# download and install [https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-2.2.0.exe Mozilla-Build 2.2.0]


== Using only generic-worker ==
=== Using mozilla-build ===


Follow this step to install Taskcluster Generic-Worker on the hardware, and have it launch as a service. After following these steps, the hardware should be ready to accept any tasks started on Taskcluster.  
This method uses a script to download test archives in order to run tests locally.
 
# download <code>script for running mozharness 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
# from treeherder, identify a changeset that contains a successful <code>build-win64-aarch64/opt</code>
# copy the task ID of the build
# invoke start-shell.bat, which will launch a bash-like commandline
# 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:
<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] and uses mozilla-central with a build artifact.
 
# invoke start-shell.bat, which will launch a bash-like commandline
# clone the repository using <code>hg clone https://hg.mozilla.org/mozilla-central/</code>
# run <code>./mach bootstrap</code> and pick artifact build
# 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 <code>.mozbuild/node</code>
# 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:
<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].
 
== Using OpenCloudConfig ==
 
This is the method used in production.
 
Steps originally taken from [https://bugzilla.mozilla.org/show_bug.cgi?id=1520432#c2 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 [https://bugzilla.mozilla.org/show_bug.cgi?id=1522997#c2 1522997].
Instruction originally from [https://bugzilla.mozilla.org/show_bug.cgi?id=1522997#c2 1522997].


=== Prerequisites ===
'''Prerequisites'''
* disable Windows S mode
* disable Windows S mode
* disable User Account Control
* disable User Account Control
Line 39: Line 85:
* request scope `assume:project:taskcluster:generic-worker-tester`  
* request scope `assume:project:taskcluster:generic-worker-tester`  


=== Steps ===
'''Steps'''
 
# download the current 386 release of `generic-worker-windows-386.exe` from [https://github.com/taskcluster/generic-worker/releases taskcluster generic-worker].
# download the current 386 release of `generic-worker-windows-386.exe` from [https://github.com/taskcluster/generic-worker/releases taskcluster generic-worker].
# download the latest 386 version of livelog.exe and taskcluster-proxy.exe.
# download the latest 386 version of livelog.exe and taskcluster-proxy.exe.
Line 54: Line 99:
  "ed25519SigningKeyLocation":  "<file location you wrote ed25519 private key in step 6>",
  "ed25519SigningKeyLocation":  "<file location you wrote ed25519 private key in step 6>",
  "livelogSecret":              "<any text>",
  "livelogSecret":              "<any text>",
"openpgpSigningKeyLocation":  "<file location you wrote gpg private key kn step 6>",
  "provisionerId":              "test-provisioner",
  "provisionerId":              "test-provisioner",
  "publicIP":                  "<ideally an IP address of one of your network interfaces>",
  "publicIP":                  "<ideally an IP address of one of your network interfaces>",
Line 68: Line 112:
# sc query "Generic Worker"
# sc query "Generic Worker"


== Using OpenCloudConfig ==
= Currently running on CI =
 
Currently, a limit subset of tests are running regularly on <code>mozilla-central</code> and <code>try</code>. This is to reduce the load on the windows10-aarch64 hardware, which is limited in number.
 
= 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 ==


This is the method that is used in production.
* try access (commit access level 1)
* up-to-date mozilla-central codebase


Steps originally taken from [https://bugzilla.mozilla.org/show_bug.cgi?id=1520432#c2 1520432].
== Steps ==


# Invoke-Expression (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/mozilla-releng/OpenCloudConfig/aarch64/userdata/rundsc.ps1')
Note that on <code>try</code>, windows10-aarch64 is hidden by default; please use <code>./mach try fuzzy --full</code> to schedule jobs.


= Currently Running =
# <code>./mach try fuzzy --full</code>
# select tests that need to be run (e.g. 'windows10-aarch64 xpcshell')
# enter


Currently supported list of tests include:
Tests will appear in Treeherder under the heading ''Windows 10 AArch64 opt''.


* awsy
= Greening tests =
* mochitest (all flavors, including e10s)
* web-platform-tests (all flavors)
* reftests (including crashtest, jsreftest)
* xpcshell


Supported, requires non-artifact build:
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.


* jittest
== Example 1 ==
* gtests
* cppunittest


There is remaining work needed to get these test suites running:
As part of [https://bugzilla.mozilla.org/show_bug.cgi?id=1525743 1525743], the timeout for mochitest-browser-chrome was extended to 4x the default value if the platform combination of Windows and ARM64 is detected.
* talos
* raptor
* marionette


For an up-to-date list of tests, please refer to [https://searchfox.org/mozilla-central/source/taskcluster/ci/test/test-platforms.yml#222 this file].
See change: https://phabricator.services.mozilla.com/D19882


= Run tests =
This change greened the test that was previously failing due to a timeout.


This is probably what you came to the document for. How to run tests against the windows10-aarch64 hardware currently available. Note, the number of hardware is limited so please exercise caution when scheduling tests.
== Example 2 ==


== Overview ==
Some tests provide a manifest file in the form of <test_category>.ini, such as ''mochitest.ini''.


Follow these steps to be able to enable windows10-aarch64 tests for the try server. These steps are required as of 2019-02-25; it will become obsolete when windows10-aarch64 tests are released to the general public.
For [https://bugzilla.mozilla.org/show_bug.cgi?id=1525665 bug 1525665] it was determined to disable a certain a11y test while windows10-aarch64 a11y support was being investigated.


=== Prerequisites ===
See change: https://phabricator.services.mozilla.com/D22363


* try access (commit access level 1)
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.
* up-to-date mozilla-central codebase


=== Steps ===
== Example 3 ==


# open the file at taskcluster/ci/test/test-platforms.yml
Another example of manipulating the manifest of a category of tests, this time with ''web-platform-tests''.
# search for 'windows10-aarch64/opt'
# uncomment all or some of the items under 'test-sets'
# make changes to the local codebase that needs testing
# ./mach try fuzzy
# select tests that need to be run
# enter


Tests will appear in Treeherder under the heading ''windows10-aarch64 opt''.
For [https://bugzilla.mozilla.org/show_bug.cgi?id=1533912 bug 1533912], the manifest was modified to disable the test if it was running on aarch64 hardware.


= Greening tests =
See change: https://phabricator.services.mozilla.com/D23003


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.
Note that web-platform-tests use a slightly different format in order.


== Example 1 ==
== Example 4 ==


As part of [https://bugzilla.mozilla.org/show_bug.cgi?id=1525743 1525743], the timeout for mochitest-browser-chrome was extended to 4x the default value if the platform combination of Windows and ARM64 is detected.
Certain test cases in reftest/crashtest/jsreftest had unexpected outcomes on windows10-aarch64.


See change: https://phabricator.services.mozilla.com/D19882
For [https://bugzilla.mozilla.org/show_bug.cgi?id=1536365 bug 1536365] and [https://bugzilla.mozilla.org/show_bug.cgi?id=1536363 bug 1536363], the requirement was to adjust the pixel-difference values such that tests will pass.


This change greened the test that was previously failing due to a timeout.
See change: https://phabricator.services.mozilla.com/D25113


= Bugs =
= Bugs =


These are the top-level tracking bugs; the recommended view is [https://bugzilla.mozilla.org/showdependencytree.cgi?id=1522997&hide_resolved=0 tree] (login required).
These are the top-level tracking bugs; the recommended view is [https://bugzilla.mozilla.org/showdependencytree.cgi?id=1522997&hide_resolved=0 tree] (login required).
CI-A team will make efforts to re-test disabled tests on a semi-regular basis, or whenever fixes are committed to components that had tests disabled.


<bugzilla>
<bugzilla>
74

edits