summaryrefslogtreecommitdiffstats
path: root/scripts/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/contrib')
-rwxr-xr-xscripts/contrib/build-perf-test.sh84
1 files changed, 49 insertions, 35 deletions
diff --git a/scripts/contrib/build-perf-test.sh b/scripts/contrib/build-perf-test.sh
index 0f7a3a9ae5..103475d320 100755
--- a/scripts/contrib/build-perf-test.sh
+++ b/scripts/contrib/build-perf-test.sh
@@ -36,23 +36,25 @@ cat << EOT
36Usage: $ME [-h] 36Usage: $ME [-h]
37 $ME [-c <commit>] [-v] [-m <val>] [-j <val>] [-t <val>] [-i <image-name>] [-d <path>] 37 $ME [-c <commit>] [-v] [-m <val>] [-j <val>] [-t <val>] [-i <image-name>] [-d <path>]
38Options: 38Options:
39 -h 39 -h
40 Display this help and exit. 40 Display this help and exit.
41 -c <commit> 41 -c <commit>
42 git checkout <commit> before anything else 42 git checkout <commit> before anything else
43 -v 43 -v
44 Show bitbake output, don't redirect it to a log. 44 Show bitbake output, don't redirect it to a log.
45 -m <machine> 45 -m <machine>
46 Value for MACHINE. Default is qemux86. 46 Value for MACHINE. Default is qemux86.
47 -j <val> 47 -j <val>
48 Value for PARALLEL_MAKE. Default is 8. 48 Value for PARALLEL_MAKE. Default is 8.
49 -t <val> 49 -t <val>
50 Value for BB_NUMBER_THREADS. Default is 8. 50 Value for BB_NUMBER_THREADS. Default is 8.
51 -i <image-name> 51 -i <image-name>
52 Instead of timing agains core-image-sato, use <image-name> 52 Instead of timing agains core-image-sato, use <image-name>
53 -d <path> 53 -d <path>
54 Use <path> as DL_DIR 54 Use <path> as DL_DIR
55 55 -p <githash>
56 Cherry pick githash onto the commit
57
56Note: current working directory must be inside a poky git clone. 58Note: current working directory must be inside a poky git clone.
57 59
58EOT 60EOT
@@ -71,29 +73,32 @@ verbose=0
71dldir= 73dldir=
72commit= 74commit=
73pmake= 75pmake=
74while getopts "hvc:m:j:t:i:d:" opt; do 76cherrypicks=
75 case $opt in 77while getopts "hvc:m:j:t:i:d:p:" opt; do
76 h) usage 78 case $opt in
77 exit 0 79 h) usage
78 ;; 80 exit 0
79 v) verbose=1 81 ;;
80 ;; 82 v) verbose=1
81 c) commit=$OPTARG 83 ;;
82 ;; 84 c) commit=$OPTARG
83 m) export MACHINE=$OPTARG 85 ;;
84 ;; 86 m) export MACHINE=$OPTARG
85 j) pmake=$OPTARG 87 ;;
86 ;; 88 j) pmake=$OPTARG
87 t) export BB_NUMBER_THREADS=$OPTARG 89 ;;
88 ;; 90 t) export BB_NUMBER_THREADS=$OPTARG
91 ;;
89 i) IMAGE=$OPTARG 92 i) IMAGE=$OPTARG
90 ;; 93 ;;
91 d) dldir=$OPTARG 94 d) dldir=$OPTARG
92 ;; 95 ;;
93 *) usage 96 p) cherrypicks="$cherrypicks $OPTARG"
94 exit 1 97 ;;
95 ;; 98 *) usage
96 esac 99 exit 1
100 ;;
101 esac
97done 102done
98 103
99 104
@@ -113,6 +118,12 @@ if [ -n "$commit" ]; then
113 git pull > /dev/null 2>&1 118 git pull > /dev/null 2>&1
114fi 119fi
115 120
121if [ -n "$cherrypicks" ]; then
122 for c in $cherrypicks; do
123 git cherry-pick $c
124 done
125fi
126
116rev=$(git rev-parse --short HEAD) || exit 1 127rev=$(git rev-parse --short HEAD) || exit 1
117OUTDIR="$clonedir/build-perf-test/results-$rev-`date "+%Y%m%d%H%M%S"`" 128OUTDIR="$clonedir/build-perf-test/results-$rev-`date "+%Y%m%d%H%M%S"`"
118BUILDDIR="$OUTDIR/build" 129BUILDDIR="$OUTDIR/build"
@@ -176,7 +187,7 @@ bbtime () {
176 TIMES[(( time_count++ ))]="$t" 187 TIMES[(( time_count++ ))]="$t"
177 else 188 else
178 log "Exit status was non-zero. Exit..." 189 log "Exit status was non-zero. Exit..."
179 exit $ret 190 #exit $ret
180 fi 191 fi
181 192
182 #time by default overwrites the output file and we want to keep the results 193 #time by default overwrites the output file and we want to keep the results
@@ -269,8 +280,8 @@ bbtime "virtual/kernel"
269test1_p3 () { 280test1_p3 () {
270log "Running Test 1, part 3/3: Build $IMAGE w/o sstate and report size of tmp/dir with rm_work enabled" 281log "Running Test 1, part 3/3: Build $IMAGE w/o sstate and report size of tmp/dir with rm_work enabled"
271echo "INHERIT += \"rm_work\"" >> conf/local.conf 282echo "INHERIT += \"rm_work\"" >> conf/local.conf
272do_rmtmp 283#do_rmtmp
273do_rmsstate 284#do_rmsstate
274do_sync 285do_sync
275bbtime "$IMAGE" 286bbtime "$IMAGE"
276sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf 287sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf
@@ -303,6 +314,9 @@ test2
303 314
304log "All done" 315log "All done"
305 316
317do_rmtmp
318do_rmsstate
319
306# if we got til here write to global results 320# if we got til here write to global results
307echo "$rev" >> $globalres 321echo "$rev" >> $globalres
308for i in "${TIMES[@]}"; do 322for i in "${TIMES[@]}"; do