Skip to content

Commit 0c673e7

Browse files
authored
Merge pull request #3153 from dotty-staging/sbt-scripted
Make sbt scripted tests use the right ivy HOME
2 parents 0802abd + e55acf2 commit 0c673e7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

project/Build.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,8 @@ object Build {
877877
ScriptedPlugin.scriptedBufferLog := false,
878878
ScriptedPlugin.scriptedLaunchOpts += "-Dplugin.version=" + version.value,
879879
ScriptedPlugin.scriptedLaunchOpts += "-Dplugin.scalaVersion=" + dottyVersion,
880+
// By default scripted tests use $HOME/.ivy2 for the ivy cache. We need to override this value for the CI.
881+
ScriptedPlugin.scriptedLaunchOpts ++= ivyPaths.value.ivyHome.map("-Dsbt.ivy.home=" + _.getAbsolutePath).toList,
880882
ScriptedPlugin.scripted := ScriptedPlugin.scripted.dependsOn(Def.task {
881883
val x0 = (publishLocal in `dotty-sbt-bridge-bootstrapped`).value
882884
val x1 = (publishLocal in `dotty-interfaces`).value

project/scripts/sbt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ if [ -z "$CMD" ]; then
1010
exit 1
1111
fi
1212

13-
# get the ivy2 cache
14-
ln -s /var/cache/drone/ivy2 "$HOME/.ivy2"
15-
1613
# run sbt with the supplied arg
1714
sbt -J-Xmx4096m \
1815
-J-XX:ReservedCodeCacheSize=512m \
1916
-J-XX:MaxMetaspaceSize=1024m \
2017
-Ddotty.drone.mem=4096m \
18+
-Dsbt.ivy.home=/var/cache/drone/ivy2 \
2119
"$CMD"

0 commit comments

Comments
 (0)