commit | b4793ae55cbd0cb1e5e74327fabe1301528d4ff3 | [log] [tgz] |
---|---|---|
author | Anthony Fandrianto <atyfto@google.com> | Fri Feb 03 19:26:46 2023 +0000 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Feb 03 19:26:46 2023 +0000 |
tree | ecd5ddc5f82e5980cf9c14a3fe44f0fc04e12032 | |
parent | abd60165951fd6ae2a1d6ccc85a0063045ddd1be [diff] |
[scripts] Delete obsolete scripts Replaced by :infra target. Bug: 112403 Change-Id: Id038ba83788bb00eec6bd7b188a5cbcbeb26cd85 Reviewed-on: https://fuchsia-review.googlesource.com/c/sdk-samples/fortune-teller/+/796944 Reviewed-by: Jiaming Li <lijiaming@google.com> Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com> Fuchsia-Auto-Submit: Anthony Fandrianto <atyfto@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