This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new c6d7d92 [hotfix][travis] Speed up scala-suffix check
c6d7d92 is described below
commit c6d7d927a34a8978f3fda24b7f6f13c8cc18f043
Author: Chesnay Schepler <[email protected]>
AuthorDate: Fri Apr 26 13:28:04 2019 +0200
[hotfix][travis] Speed up scala-suffix check
- fix find -mindepth parameter
- pass PROFILE to maven to prevent downloads of modules that weren't built
beforehand
- add -maxdepth parameter for pom.xml searches
---
tools/travis_controller.sh | 2 +-
tools/verify_scala_suffixes.sh | 9 +++++----
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/tools/travis_controller.sh b/tools/travis_controller.sh
index 48206bd..e6772d7 100755
--- a/tools/travis_controller.sh
+++ b/tools/travis_controller.sh
@@ -100,7 +100,7 @@ if [ $STAGE == "$STAGE_COMPILE" ]; then
printf "Checking scala suffixes\n"
printf
"==============================================================================\n"
- ./tools/verify_scala_suffixes.sh
+ ./tools/verify_scala_suffixes.sh "${PROFILE}"
EXIT_CODE=$?
else
printf
"\n==============================================================================\n"
diff --git a/tools/verify_scala_suffixes.sh b/tools/verify_scala_suffixes.sh
index b8dce25..ad3c6a1 100755
--- a/tools/verify_scala_suffixes.sh
+++ b/tools/verify_scala_suffixes.sh
@@ -61,6 +61,7 @@
# [INFO] \- org.scala-lang:scala-library:jar:2.10.4:compile
# [INFO]
+MAVEN_ARGUMENTS=${1:-""}
if [[ `basename $PWD` == "tools" ]] ; then
cd ..
@@ -83,7 +84,7 @@ block_infected=0
# a) are not deployed during a release
# b) exist only for dev purposes
# c) no-one should depend on them
-e2e_modules=$(find flink-end-to-end-tests -mindeptha 2 -maxdepth 5 -name
'pom.xml' -printf '%h\n' | sort -u | tr '\n' ',')
+e2e_modules=$(find flink-end-to-end-tests -mindepth 2 -maxdepth 5 -name
'pom.xml' -printf '%h\n' | sort -u | tr '\n' ',')
excluded_modules=\!${e2e_modules//,/,\!},!flink-docs
echo "Analyzing modules for Scala dependencies using 'mvn dependency:tree'."
@@ -116,7 +117,7 @@ while read line; do
block_infected=1
fi
fi
-done < <(mvn -nsu dependency:tree -Dincludes=org.scala-lang -pl
${excluded_modules} | tee /dev/tty)
+done < <(mvn -nsu dependency:tree -Dincludes=org.scala-lang -pl
${excluded_modules} ${MAVEN_ARGUMENTS} | tee /dev/tty)
# deduplicate and sort
@@ -140,7 +141,7 @@ echo
echo "Checking Scala-free modules:"
for module in $clean; do
- out=`find . -name 'pom.xml' -not -path '*target*' -exec grep
"${module}_\d\+\.\d\+</artifactId>" "{}" \;`
+ out=`find . -maxdepth 3 -name 'pom.xml' -not -path '*target*' -exec grep
"${module}_\d\+\.\d\+</artifactId>" "{}" \;`
if [[ "$out" == "" ]]; then
printf "$GREEN OK $NC $module\n"
else
@@ -154,7 +155,7 @@ echo
echo "Checking Scala-dependent modules:"
for module in $infected; do
- out=`find . -name 'pom.xml' -not -path '*target*' -exec grep
"${module}</artifactId>" "{}" \;`
+ out=`find . -maxdepth 3 -name 'pom.xml' -not -path '*target*' -exec grep
"${module}</artifactId>" "{}" \;`
if [[ "$out" == "" ]]; then
printf "$GREEN OK $NC $module\n"
else