Skip to content

Make sbt scripted tests use the right ivy HOME #3153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,8 @@ object Build {
ScriptedPlugin.scriptedBufferLog := false,
ScriptedPlugin.scriptedLaunchOpts += "-Dplugin.version=" + version.value,
ScriptedPlugin.scriptedLaunchOpts += "-Dplugin.scalaVersion=" + dottyVersion,
// By default scripted tests use $HOME/.ivy2 for the ivy cache. We need to override this value for the CI.
ScriptedPlugin.scriptedLaunchOpts ++= ivyPaths.value.ivyHome.map("-Dsbt.ivy.home=" + _.getAbsolutePath).toList,
ScriptedPlugin.scripted := ScriptedPlugin.scripted.dependsOn(Def.task {
val x0 = (publishLocal in `dotty-sbt-bridge-bootstrapped`).value
val x1 = (publishLocal in `dotty-interfaces`).value
Expand Down
4 changes: 1 addition & 3 deletions project/scripts/sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ if [ -z "$CMD" ]; then
exit 1
fi

# get the ivy2 cache
ln -s /var/cache/drone/ivy2 "$HOME/.ivy2"

# run sbt with the supplied arg
sbt -J-Xmx4096m \
-J-XX:ReservedCodeCacheSize=512m \
-J-XX:MaxMetaspaceSize=1024m \
-Ddotty.drone.mem=4096m \
-Dsbt.ivy.home=/var/cache/drone/ivy2 \
"$CMD"