| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| from PB.go.fuchsia.dev.fuchsia.tools.integration.fint.proto import ( |
| set_artifacts as fint_set_artifacts_pb2, |
| ) |
| |
| DEPS = [ |
| "fuchsia/build", |
| "fuchsia/checkout", |
| "fuchsia/emu", |
| "recipe_engine/cipd", |
| "recipe_engine/path", |
| ] |
| |
| |
| def RunSteps(api): |
| api.emu.is_emulator_type("AEMU") |
| api.emu.is_emulator_type("QEMU") |
| |
| ensure_file = api.cipd.EnsureFile() |
| checkout_root = api.path["start_dir"] |
| |
| api.emu.add_aemu_to_ensure_file(ensure_file, checkout=checkout_root, subdir="aemu") |
| api.emu.add_qemu_to_ensure_file(ensure_file, checkout=checkout_root, subdir="qemu") |
| api.emu.add_edk2_to_ensure_file(ensure_file, checkout=checkout_root, subdir="edk2") |
| |
| build_dir = checkout_root.join("out", "not-default") |
| gn_results = api.build.gn_results( |
| build_dir, fint_set_artifacts=fint_set_artifacts_pb2.SetArtifacts() |
| ) |
| |
| checkout = api.checkout.CheckoutResults( |
| checkout_root, |
| snapshot_file=api.path["start_dir"].join("snapshot"), |
| release_branch=None, |
| release_version=None, |
| source_info={}, |
| ) |
| build_results = api.build.build_results( |
| checkout=checkout, build_dir=build_dir, gn_results=gn_results |
| ) |
| build_results.set_metadata.variants.append("host_asan") |
| api.emu.get_memory_for_variant(build_results) |
| |
| build_results.set_metadata.variants.append("asan") |
| api.emu.get_memory_for_variant(build_results) |
| |
| build_results.set_metadata.variants.append("coverage-rust") |
| build_results.set_metadata.target_arch = "x64" |
| api.emu.get_memory_for_variant(build_results) |
| |
| |
| def GenTests(api): |
| yield api.emu.test("default") |