blob: 363b9b9b9c538efb718bc4b3adfb504b62d91b0e [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="b05e4a6b92b2cfe608b6cd8d5d37168680fc080e"
CROS_WORKON_TREE=("52a8a8b6d3bbca5e90d4761aa308a5541d52b1bb" "5c6a69ae1a339332642149aa39da47d14efbe3fd" "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
}