blob: c66165dc4ce84c3cc351fc2f4921a6a7f78084b2 [file] [log] [blame]
# Copyright 2014 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
# Don't use Makefile.external here as it fetches from the network.
EAPI="4"
CROS_WORKON_COMMIT="edee02d9902731dbeac61c1c4fb8c677727fba78"
CROS_WORKON_TREE="89b90b8594412132be35a624c193734456dc7bcd"
CROS_WORKON_INCREMENTAL_BUILD=1
CROS_WORKON_LOCALNAME="platform2"
CROS_WORKON_PROJECT="chromiumos/platform2"
CROS_WORKON_DESTDIR="${S}/platform2"
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="bebe6ba1a6372c47fccde03567c28c07f4d1a3df"
SRC="quipper-${GIT_SHA1}.tar.gz"
SRC_URI="gs://chromeos-localmirror/distfiles/${SRC}"
LICENSE="BSD-Google"
SLOT="0"
KEYWORDS="*"
IUSE=""
RDEPEND="
>=dev-libs/glib-2.30
dev-util/perf
"
DEPEND="${RDEPEND}
chromeos-base/protofiles
test? ( app-shells/dash )
"
src_unpack() {
platform_src_unpack
mkdir "${S}"
pushd "${S}" >/dev/null
rm -rf * #This step can be removed after the chromiumos-wide-profiling subtree is removed.
unpack ${SRC}
mv "${PN}"/{.[!.],}* ./ || die
rmdir "${PN}" || die
popd >/dev/null
}
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() {
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
}