tuned;
authorwenzelm
Sat Oct 08 16:07:41 2016 +0200 (2016-10-08)
changeset 64109d54aa68e33dc
parent 64108 623abb8fecdf
child 64110 c0b96b34c7b9
tuned;
src/Pure/Tools/build_log.scala
     1.1 --- a/src/Pure/Tools/build_log.scala	Sat Oct 08 16:02:06 2016 +0200
     1.2 +++ b/src/Pure/Tools/build_log.scala	Sat Oct 08 16:07:41 2016 +0200
     1.3 @@ -232,18 +232,18 @@
     1.4    object Isatest
     1.5    {
     1.6      val engine = "isatest"
     1.7 -    val Test_Start = new Regex("""^------------------- starting test --- (.+) --- (.+)$""")
     1.8 -    val Test_End = new Regex("""^------------------- test (?:successful|FAILED) --- (.+) --- .*$""")
     1.9 +    val Start = new Regex("""^------------------- starting test --- (.+) --- (.+)$""")
    1.10 +    val End = new Regex("""^------------------- test (?:successful|FAILED) --- (.+) --- .*$""")
    1.11      val Isabelle_Version = new Regex("""^Isabelle version: (\S+)$""")
    1.12      val No_AFP_Version = new Regex("""$.""")
    1.13    }
    1.14  
    1.15 -  object AFP
    1.16 +  object AFP_Test
    1.17    {
    1.18      val engine = "afp-test"
    1.19 -    val Test_Start = new Regex("""^Start test(?: for .+)? at ([^,]+), (.*)$""")
    1.20 -    val Test_Start_Old = new Regex("""^Start test(?: for .+)? at ([^,]+)$""")
    1.21 -    val Test_End = new Regex("""^End test on (.+), .+, elapsed time:.*$""")
    1.22 +    val Start = new Regex("""^Start test(?: for .+)? at ([^,]+), (.*)$""")
    1.23 +    val Start_Old = new Regex("""^Start test(?: for .+)? at ([^,]+)$""")
    1.24 +    val End = new Regex("""^End test on (.+), .+, elapsed time:.*$""")
    1.25      val Isabelle_Version = new Regex("""^Isabelle version: .* -- hg id (\S+)$""")
    1.26      val AFP_Version = new Regex("""^AFP version: .* -- hg id (\S+)$""")
    1.27      val Bad_Init = new Regex("""^cp:.*: Disc quota exceeded$""")
    1.28 @@ -252,7 +252,7 @@
    1.29    private def parse_meta_info(log_file: Log_File): Meta_Info =
    1.30    {
    1.31      def parse(engine: String, host: String, start: Date,
    1.32 -      Test_End: Regex, Isabelle_Version: Regex, AFP_Version: Regex): Meta_Info =
    1.33 +      End: Regex, Isabelle_Version: Regex, AFP_Version: Regex): Meta_Info =
    1.34      {
    1.35        val build_engine = if (engine == "") Nil else List(Field.build_engine -> engine)
    1.36        val build_host = if (host == "") Nil else List(Field.build_host -> host)
    1.37 @@ -260,7 +260,7 @@
    1.38        val start_date = List(Field.build_start -> start.toString)
    1.39        val end_date =
    1.40          log_file.lines.last match {
    1.41 -          case Test_End(log_file.Strict_Date(end_date)) =>
    1.42 +          case End(log_file.Strict_Date(end_date)) =>
    1.43              List(Field.build_end -> end_date.toString)
    1.44            case _ => Nil
    1.45          }
    1.46 @@ -276,19 +276,21 @@
    1.47      }
    1.48  
    1.49      log_file.lines match {
    1.50 -      case Isatest.Test_Start(log_file.Strict_Date(start), host) :: _ =>
    1.51 -        parse(Isatest.engine, host, start, Isatest.Test_End,
    1.52 +      case Isatest.Start(log_file.Strict_Date(start), host) :: _ =>
    1.53 +        parse(Isatest.engine, host, start, Isatest.End,
    1.54            Isatest.Isabelle_Version, Isatest.No_AFP_Version)
    1.55  
    1.56 -      case AFP.Test_Start(log_file.Strict_Date(start), host) :: _ =>
    1.57 -        parse(AFP.engine, host, start, AFP.Test_End, AFP.Isabelle_Version, AFP.AFP_Version)
    1.58 +      case AFP_Test.Start(log_file.Strict_Date(start), host) :: _ =>
    1.59 +        parse(AFP_Test.engine, host, start, AFP_Test.End,
    1.60 +          AFP_Test.Isabelle_Version, AFP_Test.AFP_Version)
    1.61  
    1.62 -      case AFP.Test_Start_Old(log_file.Strict_Date(start)) :: _ =>
    1.63 -        parse(AFP.engine, "", start, AFP.Test_End, AFP.Isabelle_Version, AFP.AFP_Version)
    1.64 +      case AFP_Test.Start_Old(log_file.Strict_Date(start)) :: _ =>
    1.65 +        parse(AFP_Test.engine, "", start, AFP_Test.End,
    1.66 +          AFP_Test.Isabelle_Version, AFP_Test.AFP_Version)
    1.67  
    1.68        case line :: _ if line.startsWith("\0") => Meta_Info.empty
    1.69 -      case List(Isatest.Test_End(_)) => Meta_Info.empty
    1.70 -      case _ :: AFP.Bad_Init() :: _ => Meta_Info.empty
    1.71 +      case List(Isatest.End(_)) => Meta_Info.empty
    1.72 +      case _ :: AFP_Test.Bad_Init() :: _ => Meta_Info.empty
    1.73        case Nil => Meta_Info.empty
    1.74  
    1.75        case _ => log_file.err("cannot detect log header format")