reintroducing nesting.
This commit is contained in:
parent
e0207bab2a
commit
bfbf24a6c4
@ -3,6 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"log"
|
"log"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -82,7 +83,7 @@ func (suite *Testsuite) getSuite(t time.Time, name string) *Testsuite {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
s := Testsuite{
|
s := Testsuite{
|
||||||
Name: name,
|
Name: suite.Name + "/" + name,
|
||||||
Timestamp: t,
|
Timestamp: t,
|
||||||
}
|
}
|
||||||
suite.Testsuites = append(suite.Testsuites, &s)
|
suite.Testsuites = append(suite.Testsuites, &s)
|
||||||
@ -90,10 +91,14 @@ func (suite *Testsuite) getSuite(t time.Time, name string) *Testsuite {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (suite *Testsuite) getTest(t time.Time, testname string) *Testcase {
|
func (suite *Testsuite) getTest(t time.Time, testname string) *Testcase {
|
||||||
//path := strings.Split(testname, "/")
|
suitename := suite.Name
|
||||||
//for i := 0; i < len(path)-1; i++ {
|
path := strings.Split(testname, "/")
|
||||||
// suite = suite.getSuite(t, path[i])
|
for i := 0; i < len(path)-1; i++ {
|
||||||
//}
|
suite = suite.getSuite(t, path[i])
|
||||||
|
suitename = suitename + "/" + path[i]
|
||||||
|
}
|
||||||
|
testname = path[len(path)-1]
|
||||||
|
|
||||||
for _, test := range suite.Testcases {
|
for _, test := range suite.Testcases {
|
||||||
if test.Name == testname {
|
if test.Name == testname {
|
||||||
return test
|
return test
|
||||||
@ -104,7 +109,7 @@ func (suite *Testsuite) getTest(t time.Time, testname string) *Testcase {
|
|||||||
}
|
}
|
||||||
test := Testcase{
|
test := Testcase{
|
||||||
Name: testname,
|
Name: testname,
|
||||||
Classname: suite.Name,
|
Classname: suitename,
|
||||||
}
|
}
|
||||||
suite.Testcases = append(suite.Testcases, &test)
|
suite.Testcases = append(suite.Testcases, &test)
|
||||||
return &test
|
return &test
|
||||||
|
Loading…
Reference in New Issue
Block a user