-
Notifications
You must be signed in to change notification settings - Fork 1k
/
Properties.scala
70 lines (51 loc) · 2.39 KB
/
Properties.scala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package dotty
import java.nio.file._
/** Runtime properties from defines or environmnent */
object Properties {
/** If property is unset or "TRUE" we consider it `true` */
private[this] def propIsNullOrTrue(prop: String): Boolean = {
val prop = System.getProperty("dotty.tests.interactive")
prop == null || prop == "TRUE"
}
/** Are we running on the Drone CI? */
val isRunByDrone: Boolean = sys.env.isDefinedAt("DRONE")
/** Tests should run interactive? */
val testsInteractive: Boolean = propIsNullOrTrue("dotty.tests.interactive")
/** Filter out tests not matching the regex supplied by "dotty.tests.filter"
* define
*/
val testsFilter: Option[String] = sys.props.get("dotty.tests.filter")
/** Tests should override the checkfiles with the current output */
val testsUpdateCheckfile: Boolean =
sys.props.getOrElse("dotty.tests.updateCheckfiles", "FALSE") == "TRUE"
/** When set, the run tests are only compiled - not run, a warning will be
* issued
*/
val testsNoRun: Boolean = sys.props.get("dotty.tests.norun").isDefined
/** Should Unit tests run in safe mode?
*
* For run tests this means that we respawn child JVM processes after each
* test, so that they are never reused.
*/
val testsSafeMode: Boolean = sys.props.isDefinedAt("dotty.tests.safemode")
/** Extra directory containing sources for the compiler */
def dottyCompilerManagedSources: Path = Paths.get(sys.props("dotty.tests.dottyCompilerManagedSources"))
/** dotty-interfaces jar */
def dottyInterfaces: String = sys.props("dotty.tests.classes.dottyInterfaces")
/** dotty-library jar */
def dottyLibrary: String = sys.props("dotty.tests.classes.dottyLibrary")
/** dotty-compiler jar */
def dottyCompiler: String = sys.props("dotty.tests.classes.dottyCompiler")
/** dotty-staging jar */
def dottyStaging: String = sys.props("dotty.tests.classes.dottyStaging")
/** compiler-interface jar */
def compilerInterface: String = sys.props("dotty.tests.classes.compilerInterface")
/** scala-library jar */
def scalaLibrary: String = sys.props("dotty.tests.classes.scalaLibrary")
/** scala-asm jar */
def scalaAsm: String = sys.props("dotty.tests.classes.scalaAsm")
/** jline-terminal jar */
def jlineTerminal: String = sys.props("dotty.tests.classes.jlineTerminal")
/** jline-reader jar */
def jlineReader: String = sys.props("dotty.tests.classes.jlineReader")
}