diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-08-19 16:18:55 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-25 23:03:48 +0100 |
commit | 96e68f15f04b9607a75eae4e1ef9bd70a2714eb4 (patch) | |
tree | 3e590772bbfd59a64a1aa280eea2bf56d94731b7 /scripts/contrib/build-perf-test-wrapper.sh | |
parent | ee4c5f61718ea61f1d80a1c4ca9cdafb3b28e90c (diff) | |
download | poky-96e68f15f04b9607a75eae4e1ef9bd70a2714eb4.tar.gz |
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.
(From OE-Core rev: 824284895f25146520a624b7b97f7475d0135814)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/contrib/build-perf-test-wrapper.sh')
-rwxr-xr-x | scripts/contrib/build-perf-test-wrapper.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/contrib/build-perf-test-wrapper.sh b/scripts/contrib/build-perf-test-wrapper.sh index ef2a46e3d8..efc2b79d6c 100755 --- a/scripts/contrib/build-perf-test-wrapper.sh +++ b/scripts/contrib/build-perf-test-wrapper.sh | |||
@@ -29,6 +29,7 @@ Optional arguments: | |||
29 | disable tarball archiving | 29 | disable tarball archiving |
30 | -c COMMITISH test (checkout) this commit | 30 | -c COMMITISH test (checkout) this commit |
31 | -C GIT_REPO commit results into Git | 31 | -C GIT_REPO commit results into Git |
32 | -w WORK_DIR work dir for this script | ||
32 | EOF | 33 | EOF |
33 | } | 34 | } |
34 | 35 | ||
@@ -37,7 +38,7 @@ EOF | |||
37 | archive_dir=~/perf-results/archives | 38 | archive_dir=~/perf-results/archives |
38 | commitish="" | 39 | commitish="" |
39 | results_repo="" | 40 | results_repo="" |
40 | while getopts "ha:c:C:" opt; do | 41 | while getopts "ha:c:C:w:" opt; do |
41 | case $opt in | 42 | case $opt in |
42 | h) usage | 43 | h) usage |
43 | exit 0 | 44 | exit 0 |
@@ -48,13 +49,14 @@ while getopts "ha:c:C:" opt; do | |||
48 | ;; | 49 | ;; |
49 | C) results_repo=`realpath "$OPTARG"` | 50 | C) results_repo=`realpath "$OPTARG"` |
50 | ;; | 51 | ;; |
52 | w) base_dir=`realpath "$OPTARG"` | ||
53 | ;; | ||
51 | *) usage | 54 | *) usage |
52 | exit 1 | 55 | exit 1 |
53 | ;; | 56 | ;; |
54 | esac | 57 | esac |
55 | done | 58 | done |
56 | 59 | ||
57 | |||
58 | echo "Running on `uname -n`" | 60 | echo "Running on `uname -n`" |
59 | if ! git_topdir=$(git rev-parse --show-toplevel); then | 61 | if ! git_topdir=$(git rev-parse --show-toplevel); then |
60 | echo "The current working dir doesn't seem to be a git clone. Please cd there before running `basename $0`" | 62 | 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 | |||
76 | fi | 78 | fi |
77 | 79 | ||
78 | # Setup build environment | 80 | # Setup build environment |
81 | if [ -z "$base_dir" ]; then | ||
82 | base_dir="$git_topdir/build-perf-test" | ||
83 | fi | ||
84 | echo "Using working dir $base_dir" | ||
85 | |||
79 | timestamp=`date "+%Y%m%d%H%M%S"` | 86 | timestamp=`date "+%Y%m%d%H%M%S"` |
80 | git_rev=$(git rev-parse --short HEAD) || exit 1 | 87 | git_rev=$(git rev-parse --short HEAD) || exit 1 |
81 | base_dir="$git_topdir/build-perf-test" | ||
82 | build_dir="$base_dir/build-$git_rev-$timestamp" | 88 | build_dir="$base_dir/build-$git_rev-$timestamp" |
83 | results_dir="$base_dir/results-$git_rev-$timestamp" | 89 | results_dir="$base_dir/results-$git_rev-$timestamp" |
84 | globalres_log="$base_dir/globalres.log" | 90 | globalres_log="$base_dir/globalres.log" |