Skip to content

Commit 889c355

Browse files
committed
[SPARK-10359][PROJECT-INFRA] Multiple fixes to dev/test-dependencies.sh script
This patch includes multiple fixes for the `dev/test-dependencies.sh` script (which was introduced in #10461): - Use `build/mvn --force` instead of `mvn` in one additional place. - Explicitly set a zero exit code on success. - Set `LC_ALL=C` to make `sort` results agree across machines (see https://stackoverflow.com/questions/28881/). - Set `should_run_build_tests=True` for `build` module (this somehow got lost). Author: Josh Rosen <joshrosen@databricks.com> Closes #10543 from JoshRosen/dep-script-fixes.
1 parent 4e48f14 commit 889c355

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

dev/sparktestsupport/modules.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,8 @@ def contains_file(self, filename):
398398
source_file_regexes=[
399399
".*pom.xml",
400400
"dev/test-dependencies.sh",
401-
]
401+
],
402+
should_run_build_tests=True
402403
)
403404

404405
ec2 = Module(

dev/test-dependencies.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ set -e
2222
FWDIR="$(cd "`dirname $0`"/..; pwd)"
2323
cd "$FWDIR"
2424

25+
# Explicitly set locale in order to make `sort` output consistent across machines.
26+
# See https://stackoverflow.com/questions/28881 for more details.
27+
export LC_ALL=C
28+
2529
# TODO: This would be much nicer to do in SBT, once SBT supports Maven-style resolution.
2630

2731
MVN="build/mvn --force"
@@ -38,7 +42,7 @@ HADOOP_PROFILES=(
3842
# resolve Spark's internal submodule dependencies.
3943

4044
# See http://stackoverflow.com/a/3545363 for an explanation of this one-liner:
41-
OLD_VERSION=$(mvn help:evaluate -Dexpression=project.version|grep -Ev '(^\[|Download\w+:)')
45+
OLD_VERSION=$($MVN help:evaluate -Dexpression=project.version|grep -Ev '(^\[|Download\w+:)')
4246
TEMP_VERSION="spark-$(date +%s | tail -c6)"
4347

4448
function reset_version {
@@ -107,3 +111,5 @@ for HADOOP_PROFILE in "${HADOOP_PROFILES[@]}"; do
107111
exit 1
108112
fi
109113
done
114+
115+
exit 0

0 commit comments

Comments
 (0)