remove DMJsonWriter::AddTestFailure

As far as I can tell, Gold doesn't do anything with this information.
The bots go red if any unit test fails... no need to log it long-term.

Change-Id: Iae9ddd61c0a7d37437bb93441e83948c2e518b42
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/206940
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
Mike Klein 2019-04-09 11:14:04 -05:00 committed by Skia Commit-Bot
parent 42cbedd3c7
commit de8362c6f2
3 changed files with 0 additions and 33 deletions

View File

@ -1382,7 +1382,6 @@ static void run_test(skiatest::Test test, const GrContextOptions& grCtxOptions)
struct : public skiatest::Reporter {
void reportFailed(const skiatest::Failure& failure) override {
fail(failure.toString());
JsonWriter::AddTestFailure(failure);
}
bool allowExtendedTest() const override {
return FLAGS_pathOpsExtended;

View File

@ -27,14 +27,6 @@ void JsonWriter::AddBitmapResult(const BitmapResult& result) {
gBitmapResults.push_back(result);
}
SkTArray<skiatest::Failure> gFailures;
SK_DECLARE_STATIC_MUTEX(gFailureLock);
void JsonWriter::AddTestFailure(const skiatest::Failure& failure) {
SkAutoMutexAcquire lock(gFailureLock);
gFailures.push_back(failure);
}
void JsonWriter::DumpJson(const char* dir,
CommandLineFlags::StringArray key,
CommandLineFlags::StringArray properties) {
@ -98,24 +90,6 @@ void JsonWriter::DumpJson(const char* dir,
writer.endArray(); // results
}
{
SkAutoMutexAcquire lock(gFailureLock);
if (gFailures.count() > 0) {
writer.beginObject("test_results");
writer.beginArray("failures");
for (int i = 0; i < gFailures.count(); i++) {
writer.beginObject();
writer.appendString("file_name", gFailures[i].fileName);
writer.appendS32 ("line_no" , gFailures[i].lineNo);
writer.appendString("condition", gFailures[i].condition);
writer.appendString("message" , gFailures[i].message.c_str());
writer.endObject(); // 1 failure
}
writer.endArray(); // failures
writer.endObject(); // test_results
}
}
writer.endObject(); // root
writer.flush();
stream.flush();

View File

@ -10,7 +10,6 @@
#include "CommandLineFlags.h"
#include "SkString.h"
#include "Test.h"
namespace DM {
@ -42,11 +41,6 @@ public:
*/
static void AddBitmapResult(const BitmapResult&);
/**
* Add a Failure from a Test.
*/
static void AddTestFailure(const skiatest::Failure&);
/**
* Write all collected results to the file dir/dm.json.
*/