summaryrefslogtreecommitdiffstats
path: root/scripts/contrib
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-08-19 14:57:56 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-25 23:03:48 +0100
commita34fd3cf2798eb4d6bd79f632c6d9a13880c865b (patch)
treec9240a16694d210767e51f7c96c6dd07fb815f3e /scripts/contrib
parentdc3025215bbdcfce9ab08ba621335f6feabe5097 (diff)
downloadpoky-a34fd3cf2798eb4d6bd79f632c6d9a13880c865b.tar.gz
build-perf-test-wrapper.sh: allow saving results in Git
Add new command line argument '-C' that allows saving results in a Git repository. (From OE-Core rev: 3d06795d8cd9017b042a7283c16ac71d4f6317a6) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib')
-rwxr-xr-xscripts/contrib/build-perf-test-wrapper.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/scripts/contrib/build-perf-test-wrapper.sh b/scripts/contrib/build-perf-test-wrapper.sh
index 8eb4fdbc6c..2fb4b1119a 100755
--- a/scripts/contrib/build-perf-test-wrapper.sh
+++ b/scripts/contrib/build-perf-test-wrapper.sh
@@ -26,19 +26,23 @@ Usage: $script [-h] [-c COMMITISH] [-C GIT_REPO]
26Optional arguments: 26Optional arguments:
27 -h show this help and exit. 27 -h show this help and exit.
28 -c COMMITISH test (checkout) this commit 28 -c COMMITISH test (checkout) this commit
29 -C GIT_REPO commit results into Git
29EOF 30EOF
30} 31}
31 32
32 33
33# Parse command line arguments 34# Parse command line arguments
34commitish="" 35commitish=""
35while getopts "hc:" opt; do 36results_repo=""
37while getopts "hc:C:" opt; do
36 case $opt in 38 case $opt in
37 h) usage 39 h) usage
38 exit 0 40 exit 0
39 ;; 41 ;;
40 c) commitish=$OPTARG 42 c) commitish=$OPTARG
41 ;; 43 ;;
44 C) results_repo=`realpath "$OPTARG"`
45 ;;
42 *) usage 46 *) usage
43 exit 1 47 exit 1
44 ;; 48 ;;
@@ -73,13 +77,14 @@ base_dir="$git_topdir/build-perf-test"
73build_dir="$base_dir/build-$git_rev-$timestamp" 77build_dir="$base_dir/build-$git_rev-$timestamp"
74results_dir="$base_dir/results-$git_rev-$timestamp" 78results_dir="$base_dir/results-$git_rev-$timestamp"
75globalres_log="$base_dir/globalres.log" 79globalres_log="$base_dir/globalres.log"
80machine="qemux86"
76 81
77mkdir -p "$base_dir" 82mkdir -p "$base_dir"
78source ./oe-init-build-env $build_dir >/dev/null || exit 1 83source ./oe-init-build-env $build_dir >/dev/null || exit 1
79 84
80# Additional config 85# Additional config
81auto_conf="$build_dir/conf/auto.conf" 86auto_conf="$build_dir/conf/auto.conf"
82echo 'MACHINE = "qemux86"' > "$auto_conf" 87echo "MACHINE = \"$machine\"" > "$auto_conf"
83echo 'BB_NUMBER_THREADS = "8"' >> "$auto_conf" 88echo 'BB_NUMBER_THREADS = "8"' >> "$auto_conf"
84echo 'PARALLEL_MAKE = "-j 8"' >> "$auto_conf" 89echo 'PARALLEL_MAKE = "-j 8"' >> "$auto_conf"
85echo "DL_DIR = \"$base_dir/downloads\"" >> "$auto_conf" 90echo "DL_DIR = \"$base_dir/downloads\"" >> "$auto_conf"
@@ -93,7 +98,10 @@ fi
93# Run actual test script 98# Run actual test script
94if ! oe-build-perf-test --out-dir "$results_dir" \ 99if ! oe-build-perf-test --out-dir "$results_dir" \
95 --globalres-file "$globalres_log" \ 100 --globalres-file "$globalres_log" \
96 --lock-file "$base_dir/oe-build-perf.lock"; then 101 --lock-file "$base_dir/oe-build-perf.lock" \
102 --commit-results "$results_repo" \
103 --commit-results-branch "{tester_host}/{git_branch}/$machine" \
104 --commit-results-tag "{tester_host}/{git_branch}/$machine/{git_commit_count}-g{git_commit}/{tag_num}"; then
97 echo "oe-build-perf-test script failed!" 105 echo "oe-build-perf-test script failed!"
98 exit 1 106 exit 1
99fi 107fi