Skip to content

Commit be8102d

Browse files
authored
Merge pull request #330 from SethTisue/nodejs-ubuntu
detect "node" vs "nodejs" so Scala.js tests can run
2 parents 46d3191 + c07bb34 commit be8102d

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![Join the chat at https://gitter.im/scala/community-builds](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/scala/community-builds?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
44

55
This repository contains configuration files that enable us to build and test
6-
a corpus of Scala open source projects together using Typesafe's
6+
a corpus of Scala open source projects together using Lightbend's
77
[dbuild](https://github.com/typesafehub/dbuild).
88

99
**How big is it?** It's over a million lines of Scala code, total.

common.conf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
vars: {
1515
scala-ref : "scala/scala.git#2.11.x"
1616
scala-ref : ${?scala_ref} // allow overriding scala-ref using the scala_ref environment variable
17+
node : "node"
18+
node : ${?NODE}
1719

1820
// TODO: merge required changes upstream to get rid of our forks, maintaining our one won't scale
1921
browse-ref : "SethTisue/browse.git#topic/2.11-compat"
@@ -515,11 +517,10 @@ build += {
515517
"set test in (Build.compiler, Test) := {}"
516518
// - Disable fatal Scaladoc warnings, also fragile
517519
"removeScalacOptions -Xfatal-warnings"
518-
// - Use Node.js with the executable "nodejs" instead of "node" (environmental in the CI infrastructure)
519-
// We disable source map tests to save ourselves a `npm install source-map-support` on the workers.
520+
// - We disable source map tests to save ourselves a `npm install source-map-support` on the workers.
520521
// Although only `testSuite` actually has tests, dbuild will try to run the tests for all projects
521522
// that `testSuite` depends on (transitively), so we need to set it in a bunch of places.
522-
"set Seq(library, testInterface, jUnitRuntime, testSuite).map(p => jsEnv in p := NodeJSEnv(executable = \"nodejs\").value.withSourceMap(false))"
523+
"set Seq(library, testInterface, jUnitRuntime, testSuite).map(p => jsEnv in p := NodeJSEnv(executable = \""${vars.node}"\").value.withSourceMap(false))"
523524
]
524525
}
525526
}

scripts/dbuild-runner.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ then
6161
sed -i.bak "s/scalasbt.artifactoryonline.com/repo.scala-sbt.org/g" "dbuild-${DBUILDVERSION}/bin/"*.properties
6262
fi
6363

64+
# sigh, Ubuntu has nodejs but OS X has node
65+
if hash nodejs 2>/dev/null; then
66+
export NODE=nodejs
67+
else
68+
export NODE=node
69+
fi
70+
6471
echo "dbuild-${DBUILDVERSION}/bin/dbuild" "${@}" "$DBUILDCONFIG"
6572
"dbuild-${DBUILDVERSION}/bin/dbuild" "${@}" "$DBUILDCONFIG" 2>&1 | tee "dbuild-${DBUILDVERSION}/dbuild.out"
6673
STATUS="$?"

0 commit comments

Comments
 (0)