diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-08-29 13:01:32 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-10-06 08:48:48 +0300 |
commit | 85f9c4bf8bcb88380bbccf2a5d97d245c6683800 (patch) | |
tree | 42b8645e95b729377c0cb707b7f69ee93735364f | |
parent | c9bf4578fc347346aaf546e6f974abc70f52a9e1 (diff) | |
download | openembedded-core-contrib-85f9c4bf8bcb88380bbccf2a5d97d245c6683800.tar.gz |
build-perf-bisect: add esdktime test method
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rwxr-xr-x | build-perf-bisect.sh | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/build-perf-bisect.sh b/build-perf-bisect.sh index d2f16bb25e..9471151583 100755 --- a/build-perf-bisect.sh +++ b/build-perf-bisect.sh @@ -30,8 +30,8 @@ Usage: $script [-h] [-d DL_DIR] [-m TEST_METHOD] [-w WORKDIR] BUILD_TARGET THRES Optional arguments: -h show this help and exit. -d DL_DIR to use - -m test method, available options are: buildtime, tmpsize - (default: $test_method) + -m test method, available options are: + buildtime, tmpsize, esdktime (default: $test_method) -w work directory to use EOF } @@ -133,6 +133,13 @@ run_cmd () { fi } +do_sync () { + run_cmd sync || exit 255 + log "dropping kernel caches" + echo 3 | sudo -n -k /usr/bin/tee /proc/sys/vm/drop_caches > /dev/null || exit 255 + sleep 2 +} + # # TEST METHODS @@ -142,9 +149,7 @@ buildtime () { run_cmd rm -rf bitbake.lock conf/sanity_info cache tmp sstate-cache log "syncing and dropping caches" - run_cmd sync - echo 3 | sudo -n -k /usr/bin/tee /proc/sys/vm/drop_caches > /dev/null || exit 255 - sleep 2 + do_sync result=`time_cmd bitbake $1` || exit 125 result_h=`s_to_hms $result` @@ -159,9 +164,7 @@ tmpsize () { run_cmd rm -rf bitbake.lock conf/sanity_info cache tmp sstate-cache log "syncing and dropping caches" - run_cmd sync - echo 3 | sudo -n -k /usr/bin/tee /proc/sys/vm/drop_caches > /dev/null || exit 255 - sleep 2 + do_sync _time=`time_cmd bitbake $1` || exit 125 @@ -173,6 +176,24 @@ tmpsize () { run_cmd rm -rf $builddir } +esdktime () { + run_cmd rm -rf esdk-deploy + _time=`time_cmd bitbake $1 -c populate_sdk_ext` || exit 125 + + esdk_installer=(tmp/deploy/sdk/*-toolchain-ext-*.sh) + if [ ${#esdk_installer[@]} -gt 1 ]; then + log "Found ${#esdk_installer[@]} eSDK installers" + fi + + do_sync + + result=`time_cmd "${esdk_installer[-1]}" -y -d "esdk-deploy"` || exit 125 + result_h=`s_to_hms $result` + + log "removing deploy directories" + run_cmd rm -rf esdk-deploy tmp* +} + # # MAIN SCRIPT @@ -189,6 +210,11 @@ case "$test_method" in threshold=$2 threshold_h=`kib_to_gib $2` ;; + esdktime) + threshold=`hms_to_s $2` + threshold_h=`s_to_hms $threshold` + builddir="$workdir/build" + ;; *) echo "Invalid test method $test_method" exit 255 |