diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-04-12 12:21:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 12:21:30 +0200 |
commit | d541452940007bbc094e8a7f6785b6f8e9e7da22 (patch) | |
tree | fa5d9fd6b11fe9284ccff9c841a95598dc8e43d2 /compiler/test/dotty/Properties.scala | |
parent | 741ee1645a13c94fbb7edfd064b4ec092a69b1bf (diff) | |
parent | f6d519ab713cac49c6228f142cc4ccfc8880ef10 (diff) | |
download | dotty-d541452940007bbc094e8a7f6785b6f8e9e7da22.tar.gz dotty-d541452940007bbc094e8a7f6785b6f8e9e7da22.tar.bz2 dotty-d541452940007bbc094e8a7f6785b6f8e9e7da22.zip |
Merge pull request #2194 from dotty-staging/topic/hydra-part-2
Killing partest part 2 - Enter the Vulpix
Diffstat (limited to 'compiler/test/dotty/Properties.scala')
-rw-r--r-- | compiler/test/dotty/Properties.scala | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/compiler/test/dotty/Properties.scala b/compiler/test/dotty/Properties.scala new file mode 100644 index 000000000..70db82092 --- /dev/null +++ b/compiler/test/dotty/Properties.scala @@ -0,0 +1,49 @@ +package dotty + +/** 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") + + /** 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") + + /** Dotty compiler path provided through define */ + def dottyCompiler: String = sys.props("dotty.tests.classes.compiler") + + /** Dotty classpath extras provided through define */ + def dottyExtras: List[String] = + Option(sys.props("dotty.tests.extraclasspath")) + .map(_.split(":").toList) + .getOrElse(Nil) + + /** Dotty interfaces path provided through define */ + def dottyInterfaces: String = sys.props("dotty.tests.classes.interfaces") + + /** Dotty library path provided through define */ + def dottyLib: String = sys.props("dotty.tests.classes.library") +} |