diff --git a/hadoop-ozone/dev-support/checks/checkstyle.sh b/hadoop-ozone/dev-support/checks/checkstyle.sh index 19d6a89792a..c4de5288238 100755 --- a/hadoop-ozone/dev-support/checks/checkstyle.sh +++ b/hadoop-ozone/dev-support/checks/checkstyle.sh @@ -19,7 +19,7 @@ cd "$DIR/../../.." || exit 1 mvn -B -fn checkstyle:check -f pom.ozone.xml #Print out the exact violations with parsing XML results with sed -find "." -name checkstyle-errors.xml -print0 | xargs sed '$!N; //d' +find "." -name checkstyle-errors.xml -print0 | xargs -0 sed '$!N; //d' violations=$(grep -r error --include checkstyle-errors.xml .| wc -l) if [[ $violations -gt 0 ]]; then diff --git a/hadoop-ozone/dev-support/checks/findbugs.sh b/hadoop-ozone/dev-support/checks/findbugs.sh index 5dcb650e640..545ad9fd7d4 100755 --- a/hadoop-ozone/dev-support/checks/findbugs.sh +++ b/hadoop-ozone/dev-support/checks/findbugs.sh @@ -24,8 +24,8 @@ touch "$FINDBUGS_ALL_FILE" mvn -B compile -fn findbugs:check -Dfindbugs.failOnError=false -f pom.ozone.xml -find hadoop-ozone -name findbugsXml.xml -print0 | xargs -n1 convertXmlToText | tee -a "${FINDBUGS_ALL_FILE}" -find hadoop-hdds -name findbugsXml.xml -print0 | xargs -n1 convertXmlToText | tee -a "${FINDBUGS_ALL_FILE}" +find hadoop-ozone -name findbugsXml.xml -print0 | xargs -0 -n1 convertXmlToText | tee -a "${FINDBUGS_ALL_FILE}" +find hadoop-hdds -name findbugsXml.xml -print0 | xargs -0 -n1 convertXmlToText | tee -a "${FINDBUGS_ALL_FILE}" bugs=$(wc -l < "$FINDBUGS_ALL_FILE") diff --git a/hadoop-ozone/dev-support/checks/integration.sh b/hadoop-ozone/dev-support/checks/integration.sh index 9dac627cff2..1aea3d10c18 100755 --- a/hadoop-ozone/dev-support/checks/integration.sh +++ b/hadoop-ozone/dev-support/checks/integration.sh @@ -20,7 +20,7 @@ export MAVEN_OPTS="-Xmx4096m" mvn -B install -f pom.ozone.xml -DskipTests mvn -B -fn test -f pom.ozone.xml -pl :hadoop-ozone-integration-test,:hadoop-ozone-filesystem module_failed_tests=$(find "." -name 'TEST*.xml' -print0 \ - | xargs "grep" -l -E "/dev/null 2>&1 && pwd )" +cd "$DIR/../../.." || exit 1 + +OUTPUT_FILE="$DIR/../../../target/shell-problems.txt" +mkdir -p "$(dirname "$OUTPUT_FILE")" +echo "" > "$OUTPUT_FILE" +find "./hadoop-hdds" -type f -executable | grep -v target | grep -v node_modules | grep -v py | xargs -n1 shellcheck | tee "$OUTPUT_FILE" +find "./hadoop-ozone" -type f -executable | grep -v target | grep -v node_modules | grep -v py | xargs -n1 shellcheck | tee "$OUTPUT_FILE" + + +if [ "$(cat "$OUTPUT_FILE")" ]; then + exit 1 +fi diff --git a/hadoop-ozone/dev-support/checks/unit.sh b/hadoop-ozone/dev-support/checks/unit.sh index e9e09dd287f..35e5d9f1f3a 100755 --- a/hadoop-ozone/dev-support/checks/unit.sh +++ b/hadoop-ozone/dev-support/checks/unit.sh @@ -14,9 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. export MAVEN_OPTS="-Xmx4096m" -mvn -fn test -f pom.ozone.xml -pl \!:hadoop-ozone-integration-test,\!:hadoop-ozone-filesystem +#mvn -fn test -f pom.ozone.xml -pl \!:hadoop-ozone-integration-test,\!:hadoop-ozone-filesystem module_failed_tests=$(find "." -name 'TEST*.xml' -print0 \ - | xargs "grep" -l -E "