| # Copyright 2024 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. |
| import("//build/python/python_host_test.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_macro.gni") |
| import("//build/testing/host_test_data.gni") |
| |
| # Generated by //build/rust/tests/create_rustdoc_tests.py |
| # Test explanation: test the fact that our test runner will document this crate somewhere else |
| |
| group("write_docs_somewhere_else") { |
| testonly = true |
| deps = [ ":host-test($host_toolchain)" ] |
| } |
| |
| if (is_host) { |
| python_host_test("host-test") { |
| main_source = "test.py" |
| deps = [ ":host-test-data" ] |
| extra_args = |
| [ rebase_path("$target_gen_dir/echo.doc.zip.copy", root_build_dir) ] |
| } |
| host_test_data("host-test-data") { |
| sources = [ "$target_gen_dir/echo.doc.zip" ] |
| public_deps = [ |
| ":echo.rustdoc", |
| ":foxtrot.rustdoc", |
| ] |
| outputs = [ "$target_gen_dir/echo.doc.zip.copy" ] |
| } |
| } |
| |
| rustc_library("foxtrot") { |
| edition = 2021 |
| define_rustdoc_test_override = true |
| name = "foxtrot" |
| deps = [] |
| public_deps = [] |
| testonly = true |
| source_root = "../src/foxtrot.rs" |
| sources = [ "../src/foxtrot.rs" ] |
| quiet_clippy = true |
| rustdoc_out_dir = "$target_gen_dir/foxtrot.doc" |
| rustdoc_args = [] |
| zip_rustdoc_to = "$target_gen_dir/foxtrot.doc.zip" |
| } |
| rustc_library("echo") { |
| edition = 2021 |
| define_rustdoc_test_override = true |
| name = "echo" |
| deps = [ ":foxtrot" ] |
| public_deps = [ ":foxtrot.rustdoc" ] |
| testonly = true |
| source_root = "../src/echo.rs" |
| sources = [ "../src/echo.rs" ] |
| quiet_clippy = true |
| rustdoc_out_dir = "$target_gen_dir/doc" |
| rustdoc_args = [] |
| zip_rustdoc_to = "$target_gen_dir/echo.doc.zip" |
| } |