fix: get config

This commit is contained in:
lilong.129
2025-03-04 19:39:38 +08:00
parent d50b1f9855
commit e35aa782c2
10 changed files with 56 additions and 40 deletions

View File

@@ -32,7 +32,7 @@ func NewSummary() *Summary {
},
},
Time: &TestCaseTime{
StartAt: config.StartTime,
StartAt: config.GetConfig().StartTime,
},
Platform: platForm,
}
@@ -67,7 +67,7 @@ func (s *Summary) AddCaseSummary(caseSummary *TestCaseSummary) {
s.rootDir = caseSummary.RootDir
} else if s.rootDir != caseSummary.RootDir {
// if multiple testcases have different root path, use current working dir
s.rootDir = config.RootDir
s.rootDir = config.GetConfig().RootDir
}
// merge action stats
@@ -80,7 +80,7 @@ func (s *Summary) AddCaseSummary(caseSummary *TestCaseSummary) {
}
func (s *Summary) SetupDirPath() (path string, err error) {
dirPath := filepath.Join(s.rootDir, config.ResultsDir)
dirPath := filepath.Join(s.rootDir, config.GetConfig().ResultsDir)
err = builtin.EnsureFolderExists(dirPath)
if err != nil {
return "", err