blob: b9c9ade3a59a1ddb7ed05f80f6ae017b8000a84c [file] [log] [blame]
# Copyright 2018 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/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import("//build/rust/rustc_test.gni")
import("//garnet/bin/wayland/protocol.gni")
rustc_library("lib") {
edition = "2018"
name = "wayland_scanner_lib"
deps = [
"//third_party/rust_crates:num",
"//third_party/rust_crates:xml-rs",
]
}
if (host_toolchain == current_toolchain) {
rustc_binary("scanner") {
edition = "2018"
deps = [
":lib",
"//third_party/rust_crates:structopt",
]
}
}
rustc_test("wayland_scanner_front_end_test") {
edition = "2018"
deps = [ ":lib" ]
source_root = "tests/front_end_test.rs"
}
wayland_protocol("test_protocol") {
protocol = "tests/test_protocol.xml"
}
rustc_test("wayland_scanner_back_end_test") {
edition = "2018"
deps = [
":lib",
":test_protocol",
"//garnet/bin/wayland/core",
"//src/lib/zerocopy",
"//src/lib/zircon/rust:fuchsia-zircon",
]
source_root = "tests/back_end_test.rs"
}
group("tests") {
testonly = true
public_deps = [
":wayland_scanner_back_end_test",
":wayland_scanner_front_end_test",
]
}