CI Automation/windows10 aarch64: Difference between revisions

Overhauled page
(Updated section)
(Overhauled page)
Line 15: Line 15:
== Hosting ==
== Hosting ==


Currently an array of 28 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 =
== Test environment ==
Developers wishing to run tests locally have two methods.


There are two methods by which developers are able to run tests with a windows10-aarch64 hardware locally.
== Prequisites ==


=== Prequisites ===
# download and install [https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-2.2.0.exe Mozilla-Build 2.2.0]


# download [https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-2.2.0.exe Mozilla-Build 2.2.0]
== Using mozilla-build ==
# install Mozilla-Build 2.2.0
# download the test runner script from [https://bug1520867.bmoattachments.org/attachment.cgi?id=9046793 bug 1520867]


=== Mozilla-Build ===
This method uses a script to download test archives in order to run tests locally.


This method installs an older version of Mozilla-Build on the system to execute tests.
# 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 from treeherder for the windows10-aarch64 Build (artifact is supported)
# 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:
bash script.sh task_id test_type <chunk_to_run> <total_chunks>
<code>bash script.sh task_id test_type <chunk_to_run> <total_chunks></code>


Example:
Example:
bash script.sh Q-CE8DFvSAWmc08vw6bd6A xpcshell 1 8
<code>bash script.sh Q-CE8DFvSAWmc08vw6bd6A xpcshell 1 8</code>


=== Mozilla-central ===
=== 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 with hg clone https://hg.mozilla.org/mozilla-central/
# 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 as embeddable zip, then extract to mozilla-build/ directory
# download python3 embeddable zip, then extract to <code>mozilla-build/</code> directory
# comment out [https://searchfox.org/mozilla-central/rev/152993fa346c8fd9296e4cd6622234a664f53341/python/mozboot/mozboot/bootstrap.py#444 this line]
# 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 directory
# inside mozilla-build, remove the directory named <code>watchman</code>
# retry ./mach bootstrap
# 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>


./mach mochitest
= CI environment =
 
== 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].


=== 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 Taskcluster Generic-Worker [Not recommended] ===
== 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 supported list of tests include:
Currently, all tests are running regularly on <code>mozilla-central</code> and <code>try</code>.
 
* awsy
* mochitest (all flavors)
* reftests
* xpcshell
* raptor
* marionette
* web-platform-test
 
Supported, requires non-artifact build:


* cppunittest
= Run on try =
 
There is remaining work needed to get these test suites running:
 
* talos
 
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].
 
= Run tests on Try =


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.  


'''Note, the number of hardware is limited so please exercise caution when scheduling tests - a careless try can easily backlog other developers looking to test their changes.'''
'''Hardware is limited so please exercise caution when scheduling tests! A careless try will block many others. Only schedule jobs that are absolutely necessary.'''


== Overview ==
== Prerequisites ==
 
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.
 
=== 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 ===
== Steps ==
 
Note that on <code>try</code>, windows10-aarch64 is hidden by default; please use <code>./mach try fuzzy --full</code> to schedule jobs.


# open the file at taskcluster/ci/test/test-platforms.yml
# <code>./mach try fuzzy --full</code>
# 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 (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 ''windows10-aarch64 opt''.
Tests will appear in Treeherder under the heading ''Windows 10 AArch64 opt''.


= Greening tests =
= Greening tests =
75

edits