summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-09-28 14:29:19 +0300
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-10-06 08:51:47 +0300
commit9f35d0bf40a6744430f31ea4c5d380263b0ac128 (patch)
tree9149731e5c27ab15e553ab66e8420724f9b62e12
parentc9561d1a25f2aadf09e5bd6071338f544f39d3e8 (diff)
downloadopenembedded-core-contrib-9f35d0bf40a6744430f31ea4c5d380263b0ac128.tar.gz
build-perf-bisect: make build target an optional argument
Which defaults to core-image-sato. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rwxr-xr-xbuild-perf-bisect.sh16
1 files changed, 10 insertions, 6 deletions
diff --git a/build-perf-bisect.sh b/build-perf-bisect.sh
index d903e7dcf5..5dfa4a0610 100755
--- a/build-perf-bisect.sh
+++ b/build-perf-bisect.sh
@@ -20,16 +20,19 @@
# PARSE COMMAND LINE ARGUMENTS
#
script=`basename $0`
+build_target="core-image-sato"
workdir=`realpath build-perf-bisect`
test_method="buildtime"
test_count=1
usage () {
cat << EOF
-Usage: $script [-h] [-c COUNT] [-d DL_DIR] [-m TEST_METHOD] [-w WORKDIR] BUILD_TARGET THRESHOLD
+Usage: $script [-h] [-b BUILD_TARGET] [-c COUNT] [-d DL_DIR] [-m TEST_METHOD] [-w WORKDIR] THRESHOLD
Optional arguments:
-h show this help and exit.
+ -b use BUILD_TARGET for tests involving bitbake build
+ (default: $build_target)
-c average over COUNT test runs (default: $test_count)
-d DL_DIR to use
-m test method, available options are:
@@ -39,11 +42,13 @@ Optional arguments:
EOF
}
-while getopts "hc:d:m:w:" opt; do
+while getopts "hb:c:d:m:w:" opt; do
case $opt in
h) usage
exit 0
;;
+ b) build_target=$OPTARG
+ ;;
c) test_count=$OPTARG
;;
d) downloaddir=`realpath "$OPTARG"`
@@ -59,8 +64,8 @@ while getopts "hc:d:m:w:" opt; do
done
shift "$((OPTIND - 1))"
-if [ $# -ne 2 ]; then
- echo "Invalid number of positional arguments ($# instead of 2)"
+if [ $# -ne 1 ]; then
+ echo "Invalid number of positional arguments ($# instead of 1)"
usage
exit 255
fi
@@ -282,7 +287,6 @@ parsetime () {
#
# MAIN SCRIPT
#
-build_target=$1
cleanup_func=cleanup_default
quantity='TIME'
@@ -310,7 +314,7 @@ case "$test_method" in
exit 255
esac
-threshold=`h_to_raw $2`
+threshold=`h_to_raw $1`
threshold_h=`raw_to_h $threshold`
trap cleanup EXIT