blob: d4225ba4bd6a589c8188fc7967510c68af085d43 [file] [log] [blame]
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=7
CROS_WORKON_COMMIT="f34cf3a06f7b17b7829185630d886a5d9d3f0e75"
CROS_WORKON_TREE=("791c6808b4f4f5f1c484108d66ff958d65f8f1e3" "eae0546f4ee5132d4544af4770755eb05f60cba6" "e7dba8c91c1f3257c34d4a7ffff0ea2537aeb6bb")
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_OUTOFTREE_BUILD=1
CROS_WORKON_SUBTREE="common-mk libpasswordprovider .gn"
PLATFORM_SUBDIR="libpasswordprovider"
inherit cros-workon platform
DESCRIPTION="Library for storing and retrieving user password"
HOMEPAGE="https://chromium.googlesource.com/chromiumos/platform2/+/master/libpasswordprovider"
LICENSE="BSD-Google"
KEYWORDS="*"
RDEPEND="
sys-apps/keyutils:=
"
DEPEND="${RDEPEND}"
src_install() {
dolib.so "${OUT}/lib/libpasswordprovider.so"
insinto "/usr/$(get_libdir)/pkgconfig"
doins libpasswordprovider.pc
insinto "/usr/include/libpasswordprovider"
doins *.h
}
platform_pkg_test() {
platform_test "run" "${OUT}/${test_bin}" "0" "${gtest_filter}"
}
platform_pkg_test() {
local gtest_filter=""
if ! use x86 && ! use amd64 ; then
# PasswordProvider tests fail on qemu due to unsupported system calls to keyrings.
# Run only the Password unit tests on qemu since keyrings are not supported yet.
# https://crbug.com/792699
einfo "Skipping PasswordProvider unit tests on non-x86 platform"
gtest_filter+="Password.*"
fi
local tests=(
password_provider_test
)
local test_bin
for test_bin in "${tests[@]}"; do
platform_test "run" "${OUT}/${test_bin}" 0 "${gtest_filter}"
done
}