added time

This commit is contained in:
Erik Brakkee 2024-11-22 22:03:23 +01:00
parent 09fd2cb2a4
commit 7cf5827f22
2 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import (
"encoding/json" "encoding/json"
"encoding/xml" "encoding/xml"
"fmt" "fmt"
"log"
"os" "os"
"path/filepath" "path/filepath"
"strings" "strings"
@ -29,6 +30,7 @@ func (t *Test) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
Message: "failed", Message: "failed",
} }
} }
log.Printf("TIME %f", t.Time)
parts := strings.Split(t.Name, "/") parts := strings.Split(t.Name, "/")
tc := Testcase{ tc := Testcase{
Name: parts[len(parts)-1], Name: parts[len(parts)-1],

View File

@ -140,6 +140,8 @@ func (testsuites *Testsuites) Pass(t time.Time, pkg string, test string, elapsed
if testsuites.getRootSuite(t, pkg+"/"+test, false) != nil { if testsuites.getRootSuite(t, pkg+"/"+test, false) != nil {
return return
} }
tc := testsuites.getTest(t, pkg, test)
tc.Time = elapsed
} }
func (testsuites *Testsuites) Bench(t time.Time, pkg string, test string, output string, elapsed float64) { func (testsuites *Testsuites) Bench(t time.Time, pkg string, test string, output string, elapsed float64) {