mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-20 13:41:41 +00:00
wip
This commit is contained in:
parent
17501ea31a
commit
a56a7de9f2
@ -38,12 +38,12 @@ const (
|
||||
)
|
||||
|
||||
type testAttempt struct {
|
||||
pkg string // "tailscale.com/types/key"
|
||||
testName string // "TestFoo"
|
||||
outcome string // "pass", "fail", "skip"
|
||||
pkg string // "tailscale.com/types/key" `json:",inline"`
|
||||
testName string // "TestFoo" `json:",inline"`
|
||||
outcome string // "pass", "fail", "skip" `json:",omitempty"`
|
||||
logs bytes.Buffer
|
||||
isMarkedFlaky bool // set if the test is marked as flaky
|
||||
issueURL string // set if the test is marked as flaky
|
||||
isMarkedFlaky bool // set if the test is marked as flaky `json:",omitempty"`
|
||||
issueURL string // set if the test is marked as flaky `json:",omitempty"`
|
||||
|
||||
pkgFinished bool
|
||||
}
|
||||
@ -201,6 +201,12 @@ func main() {
|
||||
return
|
||||
}
|
||||
|
||||
f, err := os.Create("test_attempts.json")
|
||||
if err != nil {
|
||||
log.Printf("error creating test attempt json file: %v", err)
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
ctx := context.Background()
|
||||
type nextRun struct {
|
||||
tests []*packageTests
|
||||
@ -320,6 +326,11 @@ func main() {
|
||||
} else {
|
||||
failed = true
|
||||
}
|
||||
testAttemptJson, _ := json.Marshal(tr)
|
||||
_, err := f.Write(testAttemptJson)
|
||||
if err != nil {
|
||||
log.Printf("error appending to test attempt json file: %v", err)
|
||||
}
|
||||
}
|
||||
if failed {
|
||||
fmt.Println("\n\nNot retrying flaky tests because non-flaky tests failed.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user