This is an automated email from the ASF dual-hosted git repository.

bnolsen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/trafficserver-ci.git


The following commit(s) were added to refs/heads/main by this push:
     new 3b659f8  change logiic to look deeper into the reports
     new 9a2b318  Merge pull request #65 from traeak/ca_reports
3b659f8 is described below

commit 3b659f8c65a2de40a7d0ee3a9fdc8b35da53f60e
Author: Brian Olsen <[email protected]>
AuthorDate: Wed Oct 27 07:21:28 2021 -0700

    change logiic to look deeper into the reports
---
 jenkins/bin/clang-analyzer.sh | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/jenkins/bin/clang-analyzer.sh b/jenkins/bin/clang-analyzer.sh
index 5c3904f..892830f 100755
--- a/jenkins/bin/clang-analyzer.sh
+++ b/jenkins/bin/clang-analyzer.sh
@@ -16,7 +16,6 @@
 #  See the License for the specific language governing permissions and
 #  limitations under the License.
 
-#!/bin/bash
 set -x
 
 test -z "${WORKSPACE}" && WORKSPACE=".."
@@ -31,6 +30,7 @@ scan-build-10 --keep-cc \
 
 # build things like yamlcpp without the analyzer 
 make -j4 -C lib all-local V=1 Q=
+rptdir="${WORKSPACE}/output/${GITHUB_BRANCH}"
 
 scan-build-10 --keep-cc \
   -enable-checker alpha.unix.cstring.BufferOverlap \
@@ -38,17 +38,21 @@ scan-build-10 --keep-cc \
   -enable-checker alpha.core.CastSize \
   -enable-checker alpha.core.SizeofPtr \
   --status-bugs --keep-empty \
-  -o ${WORKSPACE}/output/${GITHUB_BRANCH} \
-       --html-title="clang-analyzer: ${GITHUB_BRANCH}" \
+  -o ${rptdir} \
+  --html-title="clang-analyzer: ${GITHUB_BRANCH}" \
   make -j4 V=1 Q=
 
 make -j4
 
-if [ ! -f ${WORKSPACE}/output/${GITHUB_BRANCH}/index.html ]; then
-  touch "${WORKSPACE}/output/${GITHUB_BRANCH}/No Errors Reported"
-       status=0
+shopt -s nullglob
+rptlist=(${rptdir}/**/index.html)
+
+# no index.html means no report
+if [ ${#rptlist[@]} -eq 0 ]; then
+  touch "${rptdir}/No Errors Reported"
+   status=0
 else
-       status=1
+   status=1
 fi
 
 exit $status

Reply via email to