Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: milo/appengine/swarming/html_data.go

Issue 2254993002: Milo: Add task expired as a failure status (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Retrain, remove build-hang test case Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package swarming 5 package swarming
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "io/ioutil" 9 "io/ioutil"
10 "path/filepath" 10 "path/filepath"
11 "strings" 11 "strings"
12 "time" 12 "time"
13 13
14 "golang.org/x/net/context" 14 "golang.org/x/net/context"
15 15
16 "github.com/luci/luci-go/common/clock/testclock" 16 "github.com/luci/luci-go/common/clock/testclock"
17 "github.com/luci/luci-go/milo/api/resp" 17 "github.com/luci/luci-go/milo/api/resp"
18 "github.com/luci/luci-go/milo/appengine/settings" 18 "github.com/luci/luci-go/milo/appengine/settings"
19 "github.com/luci/luci-go/server/templates" 19 "github.com/luci/luci-go/server/templates"
20 ) 20 )
21 21
22 var testCases = []struct { 22 var testCases = []struct {
23 input string 23 input string
24 expectations string 24 expectations string
25 }{ 25 }{
26 {"build-canceled", "build-canceled.json"}, 26 {"build-canceled", "build-canceled.json"},
27 {"build-exception", "build-exception.json"}, 27 {"build-exception", "build-exception.json"},
28 » {"build-hang", "build-hang.json"}, 28 » {"build-expired", "build-expired.json"},
29 {"build-link", "build-link.json"}, 29 {"build-link", "build-link.json"},
30 {"build-patch-failure", "build-patch-failure.json"}, 30 {"build-patch-failure", "build-patch-failure.json"},
31 {"build-pending", "build-pending.json"}, 31 {"build-pending", "build-pending.json"},
32 {"build-running", "build-running.json"}, 32 {"build-running", "build-running.json"},
33 {"build-timeout", "build-timeout.json"}, 33 {"build-timeout", "build-timeout.json"},
34 {"build-unicode", "build-unicode.json"}, 34 {"build-unicode", "build-unicode.json"},
35 } 35 }
36 36
37 func getTestCases() []string { 37 func getTestCases() []string {
38 testdata := filepath.Join("..", "swarming", "testdata") 38 testdata := filepath.Join("..", "swarming", "testdata")
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 if err != nil { 91 if err != nil {
92 panic(fmt.Errorf("Error while processing %s: %s", tc, er r)) 92 panic(fmt.Errorf("Error while processing %s: %s", tc, er r))
93 } 93 }
94 results = append(results, settings.TestBundle{ 94 results = append(results, settings.TestBundle{
95 Description: tc, 95 Description: tc,
96 Data: templates.Args{"Build": build}, 96 Data: templates.Args{"Build": build},
97 }) 97 })
98 } 98 }
99 return results 99 return results
100 } 100 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698