scripts/contrib/build-perf-test.sh: add option to allow cherry-picking of fix revisions
Adds a -p option to allow cherry-picking of fix revisions. Removes the final build/sstate directories to stop running out of space. Runs subsequent tasks even if one test fails. (From OE-Core rev: 16ea0d406a31e08071ce7d475221f0b158165405) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
c6f9e4a675
commit
a105bc40ad
|
@ -36,23 +36,25 @@ cat << EOT
|
||||||
Usage: $ME [-h]
|
Usage: $ME [-h]
|
||||||
$ME [-c <commit>] [-v] [-m <val>] [-j <val>] [-t <val>] [-i <image-name>] [-d <path>]
|
$ME [-c <commit>] [-v] [-m <val>] [-j <val>] [-t <val>] [-i <image-name>] [-d <path>]
|
||||||
Options:
|
Options:
|
||||||
-h
|
-h
|
||||||
Display this help and exit.
|
Display this help and exit.
|
||||||
-c <commit>
|
-c <commit>
|
||||||
git checkout <commit> before anything else
|
git checkout <commit> before anything else
|
||||||
-v
|
-v
|
||||||
Show bitbake output, don't redirect it to a log.
|
Show bitbake output, don't redirect it to a log.
|
||||||
-m <machine>
|
-m <machine>
|
||||||
Value for MACHINE. Default is qemux86.
|
Value for MACHINE. Default is qemux86.
|
||||||
-j <val>
|
-j <val>
|
||||||
Value for PARALLEL_MAKE. Default is 8.
|
Value for PARALLEL_MAKE. Default is 8.
|
||||||
-t <val>
|
-t <val>
|
||||||
Value for BB_NUMBER_THREADS. Default is 8.
|
Value for BB_NUMBER_THREADS. Default is 8.
|
||||||
-i <image-name>
|
-i <image-name>
|
||||||
Instead of timing agains core-image-sato, use <image-name>
|
Instead of timing agains core-image-sato, use <image-name>
|
||||||
-d <path>
|
-d <path>
|
||||||
Use <path> as DL_DIR
|
Use <path> as DL_DIR
|
||||||
|
-p <githash>
|
||||||
|
Cherry pick githash onto the commit
|
||||||
|
|
||||||
Note: current working directory must be inside a poky git clone.
|
Note: current working directory must be inside a poky git clone.
|
||||||
|
|
||||||
EOT
|
EOT
|
||||||
|
@ -71,29 +73,32 @@ verbose=0
|
||||||
dldir=
|
dldir=
|
||||||
commit=
|
commit=
|
||||||
pmake=
|
pmake=
|
||||||
while getopts "hvc:m:j:t:i:d:" opt; do
|
cherrypicks=
|
||||||
case $opt in
|
while getopts "hvc:m:j:t:i:d:p:" opt; do
|
||||||
h) usage
|
case $opt in
|
||||||
exit 0
|
h) usage
|
||||||
;;
|
exit 0
|
||||||
v) verbose=1
|
;;
|
||||||
;;
|
v) verbose=1
|
||||||
c) commit=$OPTARG
|
;;
|
||||||
;;
|
c) commit=$OPTARG
|
||||||
m) export MACHINE=$OPTARG
|
;;
|
||||||
;;
|
m) export MACHINE=$OPTARG
|
||||||
j) pmake=$OPTARG
|
;;
|
||||||
;;
|
j) pmake=$OPTARG
|
||||||
t) export BB_NUMBER_THREADS=$OPTARG
|
;;
|
||||||
;;
|
t) export BB_NUMBER_THREADS=$OPTARG
|
||||||
|
;;
|
||||||
i) IMAGE=$OPTARG
|
i) IMAGE=$OPTARG
|
||||||
;;
|
;;
|
||||||
d) dldir=$OPTARG
|
d) dldir=$OPTARG
|
||||||
;;
|
;;
|
||||||
*) usage
|
p) cherrypicks="$cherrypicks $OPTARG"
|
||||||
exit 1
|
;;
|
||||||
;;
|
*) usage
|
||||||
esac
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
@ -113,6 +118,12 @@ if [ -n "$commit" ]; then
|
||||||
git pull > /dev/null 2>&1
|
git pull > /dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$cherrypicks" ]; then
|
||||||
|
for c in $cherrypicks; do
|
||||||
|
git cherry-pick $c
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
rev=$(git rev-parse --short HEAD) || exit 1
|
rev=$(git rev-parse --short HEAD) || exit 1
|
||||||
OUTDIR="$clonedir/build-perf-test/results-$rev-`date "+%Y%m%d%H%M%S"`"
|
OUTDIR="$clonedir/build-perf-test/results-$rev-`date "+%Y%m%d%H%M%S"`"
|
||||||
BUILDDIR="$OUTDIR/build"
|
BUILDDIR="$OUTDIR/build"
|
||||||
|
@ -176,7 +187,7 @@ bbtime () {
|
||||||
TIMES[(( time_count++ ))]="$t"
|
TIMES[(( time_count++ ))]="$t"
|
||||||
else
|
else
|
||||||
log "Exit status was non-zero. Exit..."
|
log "Exit status was non-zero. Exit..."
|
||||||
exit $ret
|
#exit $ret
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#time by default overwrites the output file and we want to keep the results
|
#time by default overwrites the output file and we want to keep the results
|
||||||
|
@ -269,8 +280,8 @@ bbtime "virtual/kernel"
|
||||||
test1_p3 () {
|
test1_p3 () {
|
||||||
log "Running Test 1, part 3/3: Build $IMAGE w/o sstate and report size of tmp/dir with rm_work enabled"
|
log "Running Test 1, part 3/3: Build $IMAGE w/o sstate and report size of tmp/dir with rm_work enabled"
|
||||||
echo "INHERIT += \"rm_work\"" >> conf/local.conf
|
echo "INHERIT += \"rm_work\"" >> conf/local.conf
|
||||||
do_rmtmp
|
#do_rmtmp
|
||||||
do_rmsstate
|
#do_rmsstate
|
||||||
do_sync
|
do_sync
|
||||||
bbtime "$IMAGE"
|
bbtime "$IMAGE"
|
||||||
sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf
|
sed -i 's/INHERIT += \"rm_work\"//' conf/local.conf
|
||||||
|
@ -303,6 +314,9 @@ test2
|
||||||
|
|
||||||
log "All done"
|
log "All done"
|
||||||
|
|
||||||
|
do_rmtmp
|
||||||
|
do_rmsstate
|
||||||
|
|
||||||
# if we got til here write to global results
|
# if we got til here write to global results
|
||||||
echo "$rev" >> $globalres
|
echo "$rev" >> $globalres
|
||||||
for i in "${TIMES[@]}"; do
|
for i in "${TIMES[@]}"; do
|
||||||
|
|
Loading…
Reference in New Issue