blob: f1142f084b42357f862137d66de8ef72fa985497 [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="0c814ece11a50512bd229dc0ddcec46c698519d0"
CROS_WORKON_TREE=("cf397e9600a0b2d153f579c58419577cfca75ab7" "98c0db7e92836fcb71403a83973a9b5018fe6177" "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
}