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

mbien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 64ddda9  print simple junit report on travis job failure.
     new c1cf3c8  Merge pull request #3403 from mbien/travis-report
64ddda9 is described below

commit 64ddda9b4abbd52ee3b0f190da05b2fa92e63e03
Author: Michael Bien <mbie...@gmail.com>
AuthorDate: Mon Jan 3 21:39:37 2022 +0100

    print simple junit report on travis job failure.
---
 .travis.yml                          |  9 +++++++++
 nbbuild/travis/print-junit-report.sh | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 297927f..7793495 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,6 +24,7 @@ addons:
       - xvfb
       - openjfx
       - libgfortran3
+      - libxml2-utils
 
 install:
   - export PATH="$PATH:$TRAVIS_BUILD_DIR/nbbuild/travis"
@@ -35,6 +36,10 @@ cache:
   directories:
   - $HOME/.hgexternalcache
 
+git:
+  quiet: true
+  depth: 3
+
 matrix:
     include:
         - name: Check line endings and verify RAT report
@@ -717,3 +722,7 @@ matrix:
           script:
             - export JAVA_HOME=$TEST_JDK
             - hide-logs.sh ant $OPTS commit-validation
+
+after_failure:
+  - nbbuild/travis/print-junit-report.sh
+  - sleep 3
diff --git a/nbbuild/travis/print-junit-report.sh 
b/nbbuild/travis/print-junit-report.sh
new file mode 100755
index 0000000..63f0237
--- /dev/null
+++ b/nbbuild/travis/print-junit-report.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+echo junit report / failed tests:
+
+ls ./*/*/build/test/*/results/TEST-*.xml | while read file ;
+do
+    TEST=$(xmllint --xpath '//testsuite[@failures>0]/@name' $file 2>/dev/null)
+    status=$?
+
+    if [ $status -eq 0 ]; then
+        echo
+        echo $TEST | cut -f2 -d '=' | tr -d '"'
+        xmllint --xpath '//testsuite/testcase[./failure]/@name' $file | cut 
-f2 -d '=' | xargs -L1 echo "    failed:"
+    fi
+done
+
+echo end of report

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to