<commit_before>/* NEST (New Scala Test)
 * Copyright 2007-2010 LAMP/EPFL
 */

package scala.tools
package partest

import io._
import nsc.io._
import Properties._

trait Config {
  universe: Universe =>

  lazy val src    = absolutize(srcDir).toDirectory
  lazy val build  = new TestBuild()

  def javaHomeEnv = envOrElse("JAVA_HOME", "")
  def javaCmd     = envOrElse("JAVACMD", "java")
  def javacCmd    = Option(javaHomeEnv) map (x => Path(x) / "bin" / "javac" path) getOrElse "javac"

  /** Values related to actors.  The timeouts are in seconds.  On a dry
   *  run we only allocate one worker so the output isn't interspersed.
   */
  def workerTimeout   = 3600                                          // 1 hour, probably overly generous
  def numWorkers      = if (isDryRun) 1 else propOrElse("partest.actors", "8").toInt
  def expectedErrors  = propOrElse("partest.errors", "0").toInt
  def poolSize        = (wrapAccessControl(propOrNone("actors.corePoolSize")) getOrElse "16").toInt

  def allScalaFiles = src.deepFiles filter (_ hasExtension "scala")
  def allObjDirs    = src.deepDirs  filter (_ hasExtension "obj")
  def allLogFiles   = src.deepFiles filter (_ hasExtension "log")
  def allClassFiles = src.deepFiles filter (_ hasExtension "class")

  class TestBuild() extends BuildContribution {
    import nsc.util.ClassPath

    /** Scala core libs.
     */
    val library       = pathForComponent("library")
    val compiler      = pathForComponent("compiler")
    val partest       = pathForComponent("partest")
    val scalap        = pathForComponent("scalap", "%s.jar")<commit_msg>Reverted change that made partest fail with 'bi...<commit_after>/* NEST (New Scala Test)
 * Copyright 2007-2010 LAMP/EPFL
 */

package scala.tools
package partest

import io._
import nsc.io._
import Properties._

trait Config {
  universe: Universe =>

  lazy val src    = absolutize(srcDir).toDirectory
  lazy val build  = new TestBuild()

  def javaHomeEnv = envOrElse("JAVA_HOME", null)
  def javaCmd     = envOrElse("JAVACMD", "java")
  def javacCmd    = Option(javaHomeEnv) map (x => Path(x) / "bin" / "javac" path) getOrElse "javac"

  /** Values related to actors.  The timeouts are in seconds.  On a dry
   *  run we only allocate one worker so the output isn't interspersed.
   */
  def workerTimeout   = 3600                                          // 1 hour, probably overly generous
  def numWorkers      = if (isDryRun) 1 else propOrElse("partest.actors", "8").toInt
  def expectedErrors  = propOrElse("partest.errors", "0").toInt
  def poolSize        = (wrapAccessControl(propOrNone("actors.corePoolSize")) getOrElse "16").toInt

  def allScalaFiles = src.deepFiles filter (_ hasExtension "scala")
  def allObjDirs    = src.deepDirs  filter (_ hasExtension "obj")
  def allLogFiles   = src.deepFiles filter (_ hasExtension "log")
  def allClassFiles = src.deepFiles filter (_ hasExtension "class")

  class TestBuild() extends BuildContribution {
    import nsc.util.ClassPath

    /** Scala core libs.
     */
    val library       = pathForComponent("library")
    val compiler      = pathForComponent("compiler")
    val partest       = pathForComponent("partest")
    val scalap        = pathForComponent("scalap", "%s.jar")
{'fraction_non_alphanumeric': 0.10526315789473684, 'fraction_numerical': 0.0110803324099723, 'mean_word_length': 3.098360655737705, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5926954', 'n_tokens_mistral': 1040, 'n_tokens_neox': 981, 'n_words': 293}