build-perf-test-wrapper.sh: support pushing to remote Git
Implement new '-P' option for spefifying a Git remote where to push results after committing to a local Git repository. (From OE-Core rev: d8e14df29d28bfe805dc746f43c9f3a7726e57ce) 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
5576ce2de3
commit
7e7c31fd00
|
@ -32,6 +32,7 @@ Optional arguments:
|
||||||
-c COMMITISH test (checkout) this commit, <branch>:<commit> can be
|
-c COMMITISH test (checkout) this commit, <branch>:<commit> can be
|
||||||
specified to test specific commit of certain branch
|
specified to test specific commit of certain branch
|
||||||
-C GIT_REPO commit results into Git
|
-C GIT_REPO commit results into Git
|
||||||
|
-P GIT_REMOTE push results to a remote Git repository
|
||||||
-w WORK_DIR work dir for this script
|
-w WORK_DIR work dir for this script
|
||||||
(default: GIT_TOP_DIR/build-perf-test)
|
(default: GIT_TOP_DIR/build-perf-test)
|
||||||
-x create xml report (instead of json)
|
-x create xml report (instead of json)
|
||||||
|
@ -42,7 +43,8 @@ EOF
|
||||||
# Parse command line arguments
|
# Parse command line arguments
|
||||||
commitish=""
|
commitish=""
|
||||||
oe_build_perf_test_extra_opts=()
|
oe_build_perf_test_extra_opts=()
|
||||||
while getopts "ha:c:C:w:x" opt; do
|
oe_git_archive_extra_opts=()
|
||||||
|
while getopts "ha:c:C:P:w:x" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h) usage
|
h) usage
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -53,6 +55,8 @@ while getopts "ha:c:C:w:x" opt; do
|
||||||
;;
|
;;
|
||||||
C) results_repo=`realpath -s "$OPTARG"`
|
C) results_repo=`realpath -s "$OPTARG"`
|
||||||
;;
|
;;
|
||||||
|
P) oe_git_archive_extra_opts+=("--push" "$OPTARG")
|
||||||
|
;;
|
||||||
w) base_dir=`realpath -s "$OPTARG"`
|
w) base_dir=`realpath -s "$OPTARG"`
|
||||||
;;
|
;;
|
||||||
x) oe_build_perf_test_extra_opts+=("--xml")
|
x) oe_build_perf_test_extra_opts+=("--xml")
|
||||||
|
@ -172,6 +176,7 @@ if [ -n "$results_repo" ]; then
|
||||||
--tag-name "{hostname}/{branch}/{machine}/{commit_count}-g{commit}/{tag_number}" \
|
--tag-name "{hostname}/{branch}/{machine}/{commit_count}-g{commit}/{tag_number}" \
|
||||||
--exclude "buildstats.json" \
|
--exclude "buildstats.json" \
|
||||||
--notes "buildstats/{branch_name}" "$results_dir/buildstats.json" \
|
--notes "buildstats/{branch_name}" "$results_dir/buildstats.json" \
|
||||||
|
"${oe_git_archive_extra_opts[@]}" \
|
||||||
"$results_dir"
|
"$results_dir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue