blob: e4992b605504651fcfd947d04a824132d1aff728 [file] [log] [blame]
# Copyright 2014 The ChromiumOS Authors
# Distributed under the terms of the GNU General Public License v2
# Don't use Makefile.external here as it fetches from the network.
EAPI=7
CROS_WORKON_COMMIT="8b6e11a069e490c761cdab7ab3ff59434806cd9c"
CROS_WORKON_TREE=("41d899585b7a07ea908a0cca2944a7b8a4d13655" "f91b6afd5f2ae04ee9a2c19109a3a4a36f7659e6")
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_DESTDIR="${S}/platform2"
# chromiumos-wide-profiling directory is in $SRC_URI, not in platform2.
CROS_WORKON_SUBTREE="common-mk .gn"
PLATFORM_SUBDIR="chromiumos-wide-profiling"
inherit cros-workon platform
DESCRIPTION="quipper: chromiumos wide profiling"
HOMEPAGE="http://www.chromium.org/chromium-os/profiling-in-chromeos"
GIT_SHA1="b1c2b82a8ec75b016c36da31c845491c75b9adae"
SRC="quipper-${GIT_SHA1}.tar.gz"
SRC_URI="gs://chromeos-localmirror/distfiles/${SRC}"
SRC_DIR="src/${PN}"
LICENSE="BSD-Google"
KEYWORDS="*"
IUSE=""
COMMON_DEPEND="
>=dev-cpp/gflags-2.0:=
>=dev-libs/glib-2.30:=
dev-libs/openssl:=
dev-libs/protobuf:=
dev-libs/re2:=
dev-util/perf:=
"
RDEPEND="${COMMON_DEPEND}"
DEPEND="${COMMON_DEPEND}
chromeos-base/protofiles:=
test? ( app-shells/dash )
"
BDEPEND="
dev-libs/protobuf
"
src_unpack() {
platform_src_unpack
mkdir "${S}"
pushd "${S}" >/dev/null || die
unpack ${SRC}
mv "${SRC_DIR}"/{.[!.],}* ./ || die
eapply "${FILESDIR}"/quipper-disable-flaky-tests.patch
eapply "${FILESDIR}"/quipper-check-header.patch
eapply "${FILESDIR}"/quipper-inject-timeout.patch
popd >/dev/null || die
}
src_compile() {
# ARM tests run on qemu which is much slower. Exclude some large test
# data files for non-x86 boards.
if use x86 || use amd64 ; then
append-cppflags -DTEST_LARGE_PERF_DATA
fi
platform_src_compile
}
src_install() {
platform_src_install
dobin "${OUT}"/quipper
}
platform_pkg_test() {
local tests=(
integration_tests
perf_recorder_test
unit_tests
)
for test_bin in "${tests[@]}"; do
platform_test "run" "${OUT}/${test_bin}" "1"
done
}