[oe-commits] [openembedded-core] 42/50: build-perf-test-wrapper.sh: make workdir configurable

git at git.openembedded.org git at git.openembedded.org
Thu Aug 25 22:04:58 UTC 2016


rpurdie pushed a commit to branch master
in repository openembedded-core.

commit 824284895f25146520a624b7b97f7475d0135814
Author: Markus Lehtonen <markus.lehtonen at linux.intel.com>
AuthorDate: Fri Aug 19 16:18:55 2016 +0300

    build-perf-test-wrapper.sh: make workdir configurable
    
    New command line argument '-w' may be used to specify work dir other
    than the default <GIT_DIR>/build-perf-test.
    
    Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
---
 scripts/contrib/build-perf-test-wrapper.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/scripts/contrib/build-perf-test-wrapper.sh b/scripts/contrib/build-perf-test-wrapper.sh
index ef2a46e..efc2b79 100755
--- a/scripts/contrib/build-perf-test-wrapper.sh
+++ b/scripts/contrib/build-perf-test-wrapper.sh
@@ -29,6 +29,7 @@ Optional arguments:
                     disable tarball archiving
   -c COMMITISH      test (checkout) this commit
   -C GIT_REPO       commit results into Git
+  -w WORK_DIR       work dir for this script
 EOF
 }
 
@@ -37,7 +38,7 @@ EOF
 archive_dir=~/perf-results/archives
 commitish=""
 results_repo=""
-while getopts "ha:c:C:" opt; do
+while getopts "ha:c:C:w:" opt; do
     case $opt in
         h)  usage
             exit 0
@@ -48,13 +49,14 @@ while getopts "ha:c:C:" opt; do
             ;;
         C)  results_repo=`realpath "$OPTARG"`
             ;;
+        w)  base_dir=`realpath "$OPTARG"`
+            ;;
         *)  usage
             exit 1
             ;;
     esac
 done
 
-
 echo "Running on `uname -n`"
 if ! git_topdir=$(git rev-parse --show-toplevel); then
         echo "The current working dir doesn't seem to be a git clone. Please cd there before running `basename $0`"
@@ -76,9 +78,13 @@ if [ -n "$commitish" ]; then
 fi
 
 # Setup build environment
+if [ -z "$base_dir" ]; then
+    base_dir="$git_topdir/build-perf-test"
+fi
+echo "Using working dir $base_dir"
+
 timestamp=`date "+%Y%m%d%H%M%S"`
 git_rev=$(git rev-parse --short HEAD)  || exit 1
-base_dir="$git_topdir/build-perf-test"
 build_dir="$base_dir/build-$git_rev-$timestamp"
 results_dir="$base_dir/results-$git_rev-$timestamp"
 globalres_log="$base_dir/globalres.log"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list