(sources []string, timeout time.Duration, attachRobotLogs bool, folder string, logger log.Logger)
| 98 | } |
| 99 | |
| 100 | func (c TestRunCommand) prepareExecution(sources []string, timeout time.Duration, attachRobotLogs bool, folder string, logger log.Logger) ([]testRunParams, error) { |
| 101 | tmp, err := directories.Temp() |
| 102 | if err != nil { |
| 103 | return nil, err |
| 104 | } |
| 105 | |
| 106 | params := []testRunParams{} |
| 107 | for i, source := range sources { |
| 108 | projectReader := studio.NewStudioProjectReader(source) |
| 109 | project, err := projectReader.ReadMetadata() |
| 110 | if err != nil { |
| 111 | return nil, err |
| 112 | } |
| 113 | supported, err := project.TargetFramework.IsSupported() |
| 114 | if !supported { |
| 115 | return nil, err |
| 116 | } |
| 117 | |
| 118 | executionLogger := logger |
| 119 | if len(sources) > 1 { |
| 120 | executionLogger = NewMultiLogger(logger, "["+strconv.Itoa(i+1)+"] ") |
| 121 | } |
| 122 | uipcli := studio.NewUipcli(c.Exec, executionLogger) |
| 123 | err = uipcli.Initialize(project.TargetFramework) |
| 124 | if err != nil { |
| 125 | return nil, err |
| 126 | } |
| 127 | destination := filepath.Join(tmp, c.randomTestRunFolderName()) |
| 128 | params = append(params, *newTestRunParams(i, uipcli, executionLogger, source, destination, timeout, attachRobotLogs, folder)) |
| 129 | } |
| 130 | return params, nil |
| 131 | } |
| 132 | |
| 133 | func (c TestRunCommand) executeAll(params []testRunParams, ctx plugin.ExecutionContext, logger log.Logger) ([]testRunStatus, error) { |
| 134 | statusChannel := make(chan testRunStatus) |
no test coverage detected