more permissive for old logs;
authorwenzelm
Fri Oct 07 18:07:10 2016 +0200 (2016-10-07)
changeset 64088210aabe359ab
parent 64087 a77c57235bae
child 64089 10d719dbb3ee
more permissive for old logs;
src/Pure/Tools/build_log.scala
     1.1 --- a/src/Pure/Tools/build_log.scala	Fri Oct 07 17:46:36 2016 +0200
     1.2 +++ b/src/Pure/Tools/build_log.scala	Fri Oct 07 18:07:10 2016 +0200
     1.3 @@ -196,7 +196,7 @@
     1.4          // workaround for jdk-8u102
     1.5          s => Word.implode(Word.explode(s).map({ case "CEST" => "GMT+2" case a => a })))
     1.6  
     1.7 -    val Test_Start = new Regex("""^Start test for .+ at (.+), (\S+)$""")
     1.8 +    val Test_Start = new Regex("""^Start test (?:for \S+)? at (.+), (\S+)$""")
     1.9      val Test_End = new Regex("""^End test on (.+), \S+, elapsed time:.*$""")
    1.10      val Isabelle_Version = new Regex("""^Isabelle version: .* -- hg id (\S+)$""")
    1.11      val AFP_Version = new Regex("""^AFP version: .* -- hg id (\S+)$""")
    1.12 @@ -209,19 +209,17 @@
    1.13          (start, log_file.lines.last) match {
    1.14            case (AFP.Date_Format(start_date), AFP.Test_End(AFP.Date_Format(end_date))) =>
    1.15              val isabelle_version =
    1.16 -              log_file.find_match(AFP.Isabelle_Version) getOrElse
    1.17 -                log_file.err("missing Isabelle version")
    1.18 +              log_file.find_match(AFP.Isabelle_Version).map((Field.isabelle_version, _))
    1.19              val afp_version =
    1.20 -              log_file.find_match(AFP.AFP_Version) getOrElse
    1.21 -                log_file.err("missing AFP version")
    1.22 +              log_file.find_match(AFP.AFP_Version).map((Field.afp_version, _))
    1.23  
    1.24              Header(Header_Kind.AFP_TEST,
    1.25                List(
    1.26                  Field.build_host -> hostname,
    1.27                  Field.build_start -> start_date.toString,
    1.28 -                Field.build_end -> end_date.toString,
    1.29 -                Field.isabelle_version -> isabelle_version,
    1.30 -                Field.afp_version -> afp_version),
    1.31 +                Field.build_end -> end_date.toString) :::
    1.32 +              isabelle_version.toList :::
    1.33 +              afp_version.toList,
    1.34                log_file.get_settings(Settings.all_settings))
    1.35  
    1.36            case _ => log_file.err("cannot detect start/end date in afp-test log")