From 8baebb54e13b518ead45e5afabdbf18c48e6efa8 Mon Sep 17 00:00:00 2001 From: "Doroszlai, Attila" Date: Wed, 25 Sep 2019 12:02:42 +0200 Subject: [PATCH] HDDS-2171. Dangling links in test report due to incompatible realpath Closes #1515 --- .../dev-support/checks/_mvn_unit_report.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/hadoop-ozone/dev-support/checks/_mvn_unit_report.sh b/hadoop-ozone/dev-support/checks/_mvn_unit_report.sh index 9525a9fcd4e..df193307d2f 100755 --- a/hadoop-ozone/dev-support/checks/_mvn_unit_report.sh +++ b/hadoop-ozone/dev-support/checks/_mvn_unit_report.sh @@ -16,6 +16,16 @@ REPORT_DIR=${REPORT_DIR:-$PWD} +_realpath() { + if realpath "$@" > /dev/null; then + realpath "$@" + else + local relative_to + relative_to=$(realpath "${1/--relative-to=/}") || return 1 + realpath "$2" | sed -e "s@${relative_to}/@@" + fi +} + ## generate summary txt file find "." -name 'TEST*.xml' -print0 \ | xargs -n1 -0 "grep" -l -E "> "$SUMMARY_FILE" done done