| mtklein@google.com | d36522d | 2013-10-16 13:02:15 +0000 | [diff] [blame] | 1 | #include "DMReporter.h" |
| 2 | |
| 3 | namespace DM { |
| 4 | |
| 5 | void Reporter::updateStatusLine() const { |
| 6 | SkDebugf("\r\033[K%d / %d, %d failed", this->finished(), this->started(), this->failed()); |
| 7 | } |
| 8 | |
| 9 | int32_t Reporter::failed() const { |
| 10 | SkAutoMutexAcquire reader(&fMutex); |
| 11 | return fFailures.count(); |
| 12 | } |
| 13 | |
| 14 | void Reporter::fail(SkString name) { |
| 15 | SkAutoMutexAcquire writer(&fMutex); |
| 16 | fFailures.push_back(name); |
| 17 | } |
| 18 | |
| 19 | void Reporter::getFailures(SkTArray<SkString>* failures) const { |
| 20 | SkAutoMutexAcquire reader(&fMutex); |
| 21 | *failures = fFailures; |
| 22 | } |
| 23 | |
| 24 | } // namespace DM |