blob: 85a22bd91fd9af8ab3da60a161fd151d313ca0eb [file] [log] [blame]
# Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=4
CROS_WORKON_COMMIT="92bb409ba93356d341fbc25735d2ec9fe114514e"
CROS_WORKON_TREE="d406eb3125c093247c780d13df47a69ad9bcf948"
CROS_WORKON_PROJECT="chromiumos/third_party/autotest"
CROS_WORKON_LOCALNAME=../third_party/autotest
CROS_WORKON_SUBDIR=files
CROS_WORKON_SUBDIR_BLACKLIST=( "Documentation" "ExternalSource" "logs" "manifest-versions" "packages" "results" "site-packages" "frontend/client/www" "containers")
inherit cros-workon cros-constants
DESCRIPTION="Autotest scripts and tools"
HOMEPAGE="http://dev.chromium.org/chromium-os/testing"
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="*"
RDEPEND="
chromeos-base/autotest-server-deps
chromeos-base/autotest-web-frontend
"
DEPEND=""
AUTOTEST_WORK="${WORKDIR}/autotest-work"
AUTOTEST_BASE="/autotest"
src_prepare() {
mkdir -p "${AUTOTEST_WORK}"
cp -fpru "${S}"/* "${AUTOTEST_WORK}/" &>/dev/null
find "${AUTOTEST_WORK}" -name '*.pyc' -delete
# Remove the shadow_config.ini file.
rm "${AUTOTEST_WORK}"/shadow_config.ini
}
src_compile() {
protoc --proto_path "${S}" --python_out="${AUTOTEST_WORK}" "${S}/tko/tko.proto"
}
src_configure() {
cros-workon_src_configure
}
src_install() {
insinto "${AUTOTEST_BASE}"
doins -r "${AUTOTEST_WORK}"/*
chmod a+x "${D}/${AUTOTEST_BASE}"/tko/*.cgi
dosym /var/log/autotest "${AUTOTEST_BASE}"/logs
insinto /etc/init
doins "${FILESDIR}"/*.conf
}
src_test() {
# Run the autotest unit tests.
./utils/unittest_suite.py --debug || die "Autotest unit tests failed."
}