(s suite.Suite, filters runtime.Filters)
| 155 | } |
| 156 | |
| 157 | func execute(s suite.Suite, filters runtime.Filters) (runtime.Result, error) { |
| 158 | tests := s.GetTests() |
| 159 | if len(filters) != 0 { |
| 160 | tests = []runtime.TestCase{} |
| 161 | } |
| 162 | |
| 163 | // Filter tests if test filters was given |
| 164 | for _, f := range filters { |
| 165 | t, err := s.FindTests(f) |
| 166 | if err != nil { |
| 167 | return runtime.Result{}, err |
| 168 | } |
| 169 | tests = append(tests, t...) |
| 170 | } |
| 171 | |
| 172 | r := runtime.NewRuntime(out.GetEventHandler(), s.Nodes...) |
| 173 | result := r.Start(tests) |
| 174 | |
| 175 | return result, nil |
| 176 | } |
| 177 | |
| 178 | func getSuite(filePath string, fileName string) (suite.Suite, error) { |
| 179 | s := suite.Suite{} |
no test coverage detected