blob: c635b07d2571f97d08595b57003b56848c3e24a6 [file] [log] [blame]
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=6
CROS_WORKON_COMMIT="0cc0baa32048f452968863641e277af555c6dfd4"
CROS_WORKON_TREE="df730eacc870d752b31f5d89bb78a2c52c8f0c28"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_SUBTREE="chromeos-dbus-bindings"
inherit cros-workon cros-rust
CROS_RUST_CRATE_NAME="chromeos_dbus_bindings"
DESCRIPTION="Chrome OS D-Bus bindings generator for Rust."
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/chromeos-dbus-bindings/"
LICENSE="BSD-Google"
SLOT="0/${PVR}"
KEYWORDS="*"
src_unpack() {
cros-workon_src_unpack
S+="/${CROS_WORKON_SUBTREE}"
cros-rust_src_unpack
}
src_compile() {
ecargo_build
use test && ecargo_test --no-run
}
src_test() {
if use x86 || use amd64; then
ecargo_test
else
elog "Skipping rust unit tests on non-x86 platform"
fi
}