diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2017-03-30 14:20:17 +0530 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2017-04-10 16:44:32 +0000 |
commit | 8cd86da595e9b0630ccad3e2983e406231daa029 (patch) | |
tree | dca785fda2c1e151390b08255728f3ab23d8359c | |
parent | 204b5421a14e077dd5358bbe408709160b131b2e (diff) |
add microbenchmarks definition
This job runs ART microbenchmarks scripts hosted here:
https://android-git.linaro.org/linaro-art/art-build-scripts.git/tree/benchmarks/benchmarks_run_target.sh
The job uses adb from latest sdk since the latest adb
from master doesn't work well inside container
Change-Id: I4f0ed4e7be50306502650b47c9aee670877e71e1
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rw-r--r-- | automated/android/microbenchmarks/manifest.xml | 16 | ||||
-rwxr-xr-x | automated/android/microbenchmarks/microbenchmarks.sh | 65 | ||||
-rw-r--r-- | automated/android/microbenchmarks/microbenchmarks.yaml | 37 |
3 files changed, 118 insertions, 0 deletions
diff --git a/automated/android/microbenchmarks/manifest.xml b/automated/android/microbenchmarks/manifest.xml new file mode 100644 index 0000000..7fc51be --- /dev/null +++ b/automated/android/microbenchmarks/manifest.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<manifest> + + <remote name="linaro-android" + fetch="https://android-git.linaro.org/git/" + review="android-review.linaro.org" + /> + + <!-- Add ART optimization related projects --> + <project path="art" name="platform/art" revision="master" remote="linaro-android"/> + + <!-- ART test scripts and benchmarks --> + <project path="scripts" name="linaro-art/art-build-scripts" revision="master" remote="linaro-android" /> + <project path="benchmarks" name="linaro/art-testing" revision="master" remote="linaro-android" /> + +</manifest> diff --git a/automated/android/microbenchmarks/microbenchmarks.sh b/automated/android/microbenchmarks/microbenchmarks.sh new file mode 100755 index 0000000..14772ad --- /dev/null +++ b/automated/android/microbenchmarks/microbenchmarks.sh @@ -0,0 +1,65 @@ +#!/bin/sh -x +# shellcheck source=/<job-id>-0/secrets +. "${SECRETS_FILE}" +export SOURCE_PROJECT_NAME +export SOURCE_BUILD_NUMBER +export SOURCE_BUILD_URL +export ART_URL + +set +x +export ART_TOKEN +set -x + +# shellcheck disable=SC1091 +. ../../lib/sh-test-lib +# shellcheck disable=SC1091 +. ../../lib/android-test-lib + +PKG_DEPS="git wget binutils curl bc xz-utils python python3 python3-scipy openjdk-8-jdk" + +SKIP_INSTALL="false" + +usage() { + echo "Usage: $0 [-s <true|false>]" 1>&2 + exit 1 +} + +while getopts ':s' opt; do + case "${opt}" in + s) SKIP_INSTALL="${OPTARG}" ;; + *) usage ;; + esac +done + +if [ "${SKIP_INSTALL}" = "true" ] || [ "${SKIP_INSTALL}" = "True" ]; then + info_msg "Package installation skipped" +else + install_deps "${PKG_DEPS}" + install_latest_adb +fi + +mkdir workspace +cd workspace || exit +wget -q "${SNAPSHOTS_URL}"/"${BUILD_TARBALL}" +[ -z "$HOME" ] && export HOME="/" +git config --global user.email "ci_notify@linaro.org" +git config --global user.name "Linaro CI" +tar -xvf "${BUILD_TARBALL}" +export PATH=${PWD}/out/host/linux-x86/bin/:${PATH} + +# FIXME removing latest adb from build since it is not working well from container +rm -rf "${PWD}"/out/host/linux-x86/bin/adb +initialize_adb +adb_root +curl https://storage.googleapis.com/git-repo-downloads/repo > "${PWD}"/out/host/linux-x86/bin/repo +chmod a+x "${PWD}"/out/host/linux-x86/bin/repo +repo init -u https://android.googlesource.com/platform/manifest +cp ../manifest.xml .repo/manifest.xml +repo sync -j16 -c +export OUT=${PWD}/out/target/product/${LUNCH_TARGET}/ +./scripts/benchmarks/benchmarks_run_target.sh --skip-build true --iterations "${ITERATIONS}" --mode "${MODE}" +git clone https://git.linaro.org/people/vishal.bhoj/pbr.git; mkdir -p pbr/artifacts/ +cp ./*.json pbr/artifacts/ +wget "${SNAPSHOTS_URL}"/pinned-manifest.xml -O pbr/artifacts/pinned-manifest.xml +cd pbr || exit +python post-build-report.py diff --git a/automated/android/microbenchmarks/microbenchmarks.yaml b/automated/android/microbenchmarks/microbenchmarks.yaml new file mode 100644 index 0000000..d94cdde --- /dev/null +++ b/automated/android/microbenchmarks/microbenchmarks.yaml @@ -0,0 +1,37 @@ +metadata: + name: microbenchmarks + format: "Lava-Test-Shell Test Definition 1.0" + description: "Run ART microbenchmarks." + maintainer: + - vishal.bhoj@linaro.org + os: + - android + devices: + - pixel + - nexus5x + scope: + - performance + environment: + - lava-test-shell + - local-test-runner + +params: + SNAPSHOTS_URL: "" + SOURCE_PROJECT_NAME: "" + SOURCE_BUILD_NUMBER: "" + SOURCE_BUILD_URL: "" + ART_URL: "" + LUNCH_TARGET: "" + BUILD_TARBALL: "" + ITERATIONS: "10" + MODE: "" + # Specify url and token for file uploading. + ARTIFACTORIAL_URL: "https://archive.validation.linaro.org/artifacts/team/qa/" + +run: + steps: + - export SECRETS_FILE=${PWD}/../../../secrets + - cd ./automated/android/microbenchmarks + - . ./microbenchmarks.sh -s false + - tar -cJf artifacts.txz artifacts/ + - ../../../../utils/upload-to-artifactorial.sh -a artifacts.txz -u "${ARTIFACTORIAL_URL}" -t "${ARTIFACTORIAL_TOKEN}" |