func doRunTests()

in tools/functional_test/src/runtest/main.go [127:153]


func doRunTests(suite Suite) func() int {
	info(">>> Testing...")
	results := make(map[int]string)
	passing := make(map[int]bool)
	for index, test := range suite.Tests {
		doOneTest(index, test, suite, results, passing)
	}

	report := func() int {
		failureCount := 0
		for index := range suite.Tests {
			if !passing[index] {
				failureCount++
			}
		}
		if failureCount == 0 {
			info(">>> Summary: %s", PASSED)
		} else {
			info(">>> Summary: %s", FAILED)
		}
		for index := range suite.Tests {
			info(" > %s", results[index])
		}
		return failureCount
	}
	return report
}