commit | 87cbd4084b24fd0c034fbe21504f1b39e6456376 | [log] [tgz] |
---|---|---|
author | Darren Chan <chandarren@google.com> | Fri Jan 13 19:46:39 2023 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jan 13 19:46:39 2023 +0000 |
tree | 19dc92d94b88b171189a7735349296dcd70bd26d | |
parent | 1394aa8d174321fc85639f49f2a102fd859c78f6 [diff] |
Manually roll bazel dependencies. Update emit_test_manifest path. Fixed: 119549 Change-Id: I13f3b5d963d48ac0b47696105488d971b78ca456 Reviewed-on: https://fuchsia-review.googlesource.com/c/sdk-samples/fortune-teller/+/789322 Commit-Queue: Darren Chan <chandarren@google.com> Reviewed-by: Oliver Newman <olivernewman@google.com>
This repository contains instructions and source code to build, package and run Fuchsia samples using only the Fuchsia SDK.
Make sure this repository has the required submodules:
git submodule update --recursive --init
Run bootstrap to download bazel
scripts/bootstrap.sh
Ensure that there are Fuchsia SSH keys in your host machine. You will need them for running the Fuchsia emulator.
[[ -f "${HOME}/.ssh/fuchsia_ed25519" ]] || ssh-keygen -P "" -t ed25519 -f "${HOME}/.ssh/fuchsia_ed25519" -C "${USER}@$(hostname -f) Shared SSH Key for Fuchsia" [[ -f "${HOME}/.ssh/fuchsia_authorized_keys" ]] || ssh-keygen -y -f "${HOME}/.ssh/fuchsia_ed25519" > "${HOME}/.ssh/fuchsia_authorized_keys"
Now the repository is ready to build the sample.
Prepare the development environment
tools/bazel run :ws_emu_development
(optional) Verify that your enviroment is correctly set up
tools/bazel run :ws_emu_development.status
1.. (optional) watch the device log in a separate window
tools/ffx log
1.. Run the fortune-teller component
bazel run //src/fortune_teller:pkg.component
Watch that your fortune is printed in the log.
Start emulator (see step #1 above)
Run tests
bazel test --config=fuchsia_x64 //src/fortune_teller:test_pkg