| 181 | } |
| 182 | |
| 183 | func printSummary(summary map[string]error, printAllLogs bool) { |
| 184 | l.SetUpBasicLogging(logWriter, l.DefaultFormat) |
| 185 | |
| 186 | log.Info("Run %d test files.", len(summary)) |
| 187 | |
| 188 | allPassed := true |
| 189 | for testFile, err := range summary { |
| 190 | if err != nil { |
| 191 | log.Error(fmt.Sprintf("\tFAIL\t%s: %s", testFile, err.Error())) |
| 192 | allPassed = false |
| 193 | } else if printAllLogs { |
| 194 | log.Notice("\tOK\t%s", testFile) |
| 195 | } |
| 196 | } |
| 197 | if allPassed { |
| 198 | log.Notice("All tests have passed.") |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | func getTestFiles(args cli.Args, fileExt string) []string { |
| 203 | paths := args |