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>
This commit is contained in:
parent
ee4c5f6171
commit
96e68f15f0
|
@ -29,6 +29,7 @@ Optional arguments:
|
||||||
disable tarball archiving
|
disable tarball archiving
|
||||||
-c COMMITISH test (checkout) this commit
|
-c COMMITISH test (checkout) this commit
|
||||||
-C GIT_REPO commit results into Git
|
-C GIT_REPO commit results into Git
|
||||||
|
-w WORK_DIR work dir for this script
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +38,7 @@ EOF
|
||||||
archive_dir=~/perf-results/archives
|
archive_dir=~/perf-results/archives
|
||||||
commitish=""
|
commitish=""
|
||||||
results_repo=""
|
results_repo=""
|
||||||
while getopts "ha:c:C:" opt; do
|
while getopts "ha:c:C:w:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h) usage
|
h) usage
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -48,13 +49,14 @@ while getopts "ha:c:C:" opt; do
|
||||||
;;
|
;;
|
||||||
C) results_repo=`realpath "$OPTARG"`
|
C) results_repo=`realpath "$OPTARG"`
|
||||||
;;
|
;;
|
||||||
|
w) base_dir=`realpath "$OPTARG"`
|
||||||
|
;;
|
||||||
*) usage
|
*) usage
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
echo "Running on `uname -n`"
|
echo "Running on `uname -n`"
|
||||||
if ! git_topdir=$(git rev-parse --show-toplevel); then
|
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`"
|
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
|
fi
|
||||||
|
|
||||||
# Setup build environment
|
# 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"`
|
timestamp=`date "+%Y%m%d%H%M%S"`
|
||||||
git_rev=$(git rev-parse --short HEAD) || exit 1
|
git_rev=$(git rev-parse --short HEAD) || exit 1
|
||||||
base_dir="$git_topdir/build-perf-test"
|
|
||||||
build_dir="$base_dir/build-$git_rev-$timestamp"
|
build_dir="$base_dir/build-$git_rev-$timestamp"
|
||||||
results_dir="$base_dir/results-$git_rev-$timestamp"
|
results_dir="$base_dir/results-$git_rev-$timestamp"
|
||||||
globalres_log="$base_dir/globalres.log"
|
globalres_log="$base_dir/globalres.log"
|
||||||
|
|
Loading…
Reference in New Issue