blob: 319fcdf97f5658c18fbe97a2d09e9b97c29b72fb [file] [log] [blame]
# 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: checks to make sure that --scrape-examples-output-path resolves to the correct directory
group("working_dir_examples") {
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/quebec.doc.zip.copy", root_build_dir) ]
}
host_test_data("host-test-data") {
sources = [ "$target_gen_dir/quebec.doc.zip" ]
public_deps = [ ":quebec.rustdoc" ]
outputs = [ "$target_gen_dir/quebec.doc.zip.copy" ]
}
}
rustc_library("quebec") {
edition = 2021
define_rustdoc_test_override = true
name = "quebec"
deps = []
public_deps = []
testonly = true
source_root = "../src/quebec.rs"
sources = [ "../src/quebec.rs" ]
quiet_clippy = true
rustdoc_out_dir = "$target_gen_dir/doc"
rustdoc_args = [
"--scrape-examples-output-path",
rebase_path("$target_gen_dir/doc/examples", root_build_dir),
"--scrape-examples-target-crate=quebec",
]
zip_rustdoc_to = "$target_gen_dir/quebec.doc.zip"
}