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

elek pushed a commit to branch acceptance-coverage
in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git

commit 15873f25f7eccfdf40d7aeb93cb3053783412435
Author: Elek Márton <[email protected]>
AuthorDate: Fri May 29 19:10:26 2020 +0200

    Handle the case when only one acceptance test is covered
---
 hadoop-ozone/dev-support/checks/acceptance.sh | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/hadoop-ozone/dev-support/checks/acceptance.sh 
b/hadoop-ozone/dev-support/checks/acceptance.sh
index 272d61f..9ec6c8b 100755
--- a/hadoop-ozone/dev-support/checks/acceptance.sh
+++ b/hadoop-ozone/dev-support/checks/acceptance.sh
@@ -35,6 +35,14 @@ RES=$?
 cp result/* "$REPORT_DIR/"
 cp "$REPORT_DIR/log.html" "$REPORT_DIR/summary.html"
 set -x
-java -jar "$DIST_DIR/share/jacoco/jacoco-cli.jar" merge $(find "$REPORT_DIR" 
-name "*.jacoco.exec") --destdir "$REPORT_DIR/jacoco-combined.exec"
+
+EXEC_FILES=$(find "$REPORT_DIR" -name "*.jacoco.exec" | wc -l)
+if [[ $EXEC_FILES -gt 1 ]]; then
+  java -jar "$DIST_DIR/share/jacoco/jacoco-cli.jar" merge $(find "$REPORT_DIR" 
-name "*.jacoco.exec") --destdir "$REPORT_DIR/jacoco-combined.exec"
+fi
+
+if [[ $EXEC_FILES == 1 ]]; then
+  cp "$REPORT_DIR"/*.jacoco.exec "$REPORT_DIR/jacoco-combined.exec"
+fi
 
 exit $RES


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to