summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2018-05-16 22:51:59 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2018-05-16 22:57:09 +0000
commit1bead6281a39bf771c5df8edc532028387d267fb (patch)
treed416cdb9baccce6ab4260411e862e7094eede572
parenta8d87b8f18a9a5e54c674f58285fc37657f40718 (diff)
compare_jobs.sh: Handle incomplete target names
target names may not be sufficient to find the results, because the directory may be prefixed with $builder_type for instance. This patch handles that by looking for results directories whose name ends with the target names provided by the user. Change-Id: I3d6b5da10984fbec79e7ee72e8a88cbab9c8edb3
-rwxr-xr-xcompare_jobs.sh23
1 files changed, 15 insertions, 8 deletions
diff --git a/compare_jobs.sh b/compare_jobs.sh
index 8d0047c..97176cd 100755
--- a/compare_jobs.sh
+++ b/compare_jobs.sh
@@ -95,14 +95,21 @@ do
done
buildtargets=
-if [ $# -eq 0 ]; then
- # If the user provided no target name, use what we detected
- if [ -s ${tmptargets} ]; then
- buildtargets=`sort -u ${tmptargets}`
- fi
-else
- # Otherwise, use what the user provided
- buildtargets="$@"
+# If the user provided no target name, use what we detected
+if [ $# -ne 0 ]; then
+ # Otherwise, use what the user provided, which may be incomplete
+ # and not include builder_type for instance
+ rm -f ${tmptargets}
+ for mytarget in "$@"
+ do
+ for dir in `ls -d ${ref_logs}/*${mytarget} ${new_logs}/*${mytarget}`
+ do
+ basename ${dir} >> ${tmptargets}
+ done
+ done
+fi
+if [ -s ${tmptargets} ]; then
+ buildtargets=`sort -u ${tmptargets}`
fi
rm -f ${tmptargets}