If you have followed the instructions below and are still having trouble, see Contact information.
Building and running on Linux is officially supported, mac build is not. If you are willing to run emulator based tests locally, KVM is required. You may check if /dev/kvm
exists on the system, or follow the Enable KVM section.
Follow up chromium for linux to setup chromium environment.
Edit your .gclient
to add fuchsia
to the target_os
list. The file should look similar to this:
solutions = [ { "url": "https://chromium.googlesource.com/chromium/src.git", "managed": False, "name": "src", "custom_deps": {}, "custom_vars": {} } ] target_os = ['fuchsia']
Run gclient sync
Create a build directory:
$ gn gen out/fuchsia --args="is_debug=false dcheck_always_on=true is_component_build=false target_os=\"fuchsia\""
You can add many of the usual GN arguments like use_remoteexec = true
. In particular, when working with devices, consider using is_debug = false
and is_component_build = false
since debug and component builds can drastically increase run time and used space.
Build the target as you would for any other platform, you may specify the targets to build at the end of the command line:
$ autoninja -C out/fuchsia
out/fuchsia/bin/run_***_unittests
, e.g.$ out/fuchsia/bin/run_base_unittests
It starts a fresh new emulator instance and executes the tests on it under the hood. Also see the Running test suites section for other types of tests.
Under Linux, if your host and target CPU architectures are the same (e.g. you‘re building for Fuchsia/x64 on a Linux/x64 host) then you can benefit from QEMU’s support for the KVM hypervisor:
$ sudo apt-get install qemu-system-common
$ sudo adduser <user> kvm $ exit [log in again]
There are four types of tests available to run on Fuchsia:
Check the documentations to learn more about how to run these tests.
Documentation for the underlying testing scripts work can be found here.