diff options
| -rwxr-xr-x | scripts/contrib/build-perf-test.sh | 84 |
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 | |||
| 36 | Usage: $ME [-h] | 36 | Usage: $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>] |
| 38 | Options: | 38 | Options: |
| 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 | |||
| 56 | Note: current working directory must be inside a poky git clone. | 58 | Note: current working directory must be inside a poky git clone. |
| 57 | 59 | ||
| 58 | EOT | 60 | EOT |
| @@ -71,29 +73,32 @@ verbose=0 | |||
| 71 | dldir= | 73 | dldir= |
| 72 | commit= | 74 | commit= |
| 73 | pmake= | 75 | pmake= |
| 74 | while getopts "hvc:m:j:t:i:d:" opt; do | 76 | cherrypicks= |
| 75 | case $opt in | 77 | while 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 | ||
| 97 | done | 102 | done |
| 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 |
| 114 | fi | 119 | fi |
| 115 | 120 | ||
| 121 | if [ -n "$cherrypicks" ]; then | ||
| 122 | for c in $cherrypicks; do | ||
| 123 | git cherry-pick $c | ||
| 124 | done | ||
| 125 | fi | ||
| 126 | |||
| 116 | rev=$(git rev-parse --short HEAD) || exit 1 | 127 | rev=$(git rev-parse --short HEAD) || exit 1 |
| 117 | OUTDIR="$clonedir/build-perf-test/results-$rev-`date "+%Y%m%d%H%M%S"`" | 128 | OUTDIR="$clonedir/build-perf-test/results-$rev-`date "+%Y%m%d%H%M%S"`" |
| 118 | BUILDDIR="$OUTDIR/build" | 129 | BUILDDIR="$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" | |||
| 269 | test1_p3 () { | 280 | test1_p3 () { |
| 270 | log "Running Test 1, part 3/3: Build $IMAGE w/o sstate and report size of tmp/dir with rm_work enabled" | 281 | log "Running Test 1, part 3/3: Build $IMAGE w/o sstate and report size of tmp/dir with rm_work enabled" |
| 271 | echo "INHERIT += \"rm_work\"" >> conf/local.conf | 282 | echo "INHERIT += \"rm_work\"" >> conf/local.conf |
| 272 | do_rmtmp | 283 | #do_rmtmp |
| 273 | do_rmsstate | 284 | #do_rmsstate |
| 274 | do_sync | 285 | do_sync |
| 275 | bbtime "$IMAGE" | 286 | bbtime "$IMAGE" |
| 276 | sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf | 287 | sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf |
| @@ -303,6 +314,9 @@ test2 | |||
| 303 | 314 | ||
| 304 | log "All done" | 315 | log "All done" |
| 305 | 316 | ||
| 317 | do_rmtmp | ||
| 318 | do_rmsstate | ||
| 319 | |||
| 306 | # if we got til here write to global results | 320 | # if we got til here write to global results |
| 307 | echo "$rev" >> $globalres | 321 | echo "$rev" >> $globalres |
| 308 | for i in "${TIMES[@]}"; do | 322 | for i in "${TIMES[@]}"; do |
