[gnome-continuous-yocto/gnomeostree-3.28-rocko: 2094/8267] build-perf-test-wrapper.sh: make archive dir configurable
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 2094/8267] build-perf-test-wrapper.sh: make archive dir configurable
- Date: Sat, 16 Dec 2017 22:44:51 +0000 (UTC)
commit ee4c5f61718ea61f1d80a1c4ca9cdafb3b28e90c
Author: Markus Lehtonen <markus lehtonen linux intel com>
Date: Fri Aug 19 15:21:06 2016 +0300
build-perf-test-wrapper.sh: make archive dir configurable
Add new command line argument '-a' that can be used to define the
directory where results (tarballs) are archived. Giving an empty string
disables archiving which makes sense if you store results in Git.
(From OE-Core rev: d53cf92847aa80724be4412801c993948a09cd27)
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>
scripts/contrib/build-perf-test-wrapper.sh | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/scripts/contrib/build-perf-test-wrapper.sh b/scripts/contrib/build-perf-test-wrapper.sh
index 2fb4b11..ef2a46e 100755
--- a/scripts/contrib/build-perf-test-wrapper.sh
+++ b/scripts/contrib/build-perf-test-wrapper.sh
@@ -25,6 +25,8 @@ Usage: $script [-h] [-c COMMITISH] [-C GIT_REPO]
Optional arguments:
-h show this help and exit.
+ -a ARCHIVE_DIR archive results tarball here, give an empty string to
+ disable tarball archiving
-c COMMITISH test (checkout) this commit
-C GIT_REPO commit results into Git
EOF
@@ -32,13 +34,16 @@ EOF
# Parse command line arguments
+archive_dir=~/perf-results/archives
commitish=""
results_repo=""
-while getopts "hc:C:" opt; do
+while getopts "ha:c:C:" opt; do
case $opt in
h) usage
exit 0
;;
+ a) archive_dir=`realpath "$OPTARG"`
+ ;;
c) commitish=$OPTARG
;;
C) results_repo=`realpath "$OPTARG"`
@@ -112,13 +117,14 @@ echo -ne "\n"
cat "$globalres_log"
-echo -ne "\n\n-----------------\n"
-echo "Archiving results dir..."
-archive_dir=~/perf-results/archives
-mkdir -p "$archive_dir"
-results_basename=`basename "$results_dir"`
-results_dirname=`dirname "$results_dir"`
-tar -czf "$archive_dir/`uname -n`-${results_basename}.tar.gz" -C "$results_dirname" "$results_basename"
+if [ -n "$archive_dir" ]; then
+ echo -ne "\n\n-----------------\n"
+ echo "Archiving results in $archive_dir"
+ mkdir -p "$archive_dir"
+ results_basename=`basename "$results_dir"`
+ results_dirname=`dirname "$results_dir"`
+ tar -czf "$archive_dir/`uname -n`-${results_basename}.tar.gz" -C "$results_dirname" "$results_basename"
+fi
rm -rf "$build_dir"
rm -rf "$results_dir"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]