8323994: gtest runner repeats test name for every single gtest assertion

Backport-of: 1aae980c54
This commit is contained in:
Andrew Lu
2024-03-28 07:59:55 +00:00
committed by Vitaly Provodin
parent 79135863b1
commit 23b61da1f9

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -57,7 +57,10 @@ public class GTestResultParser {
testCase = xmlReader.getAttributeValue("", "name");
break;
case "failure":
failedTests.add(testSuite + "::" + testCase);
String failedStr = testSuite + "::" + testCase;
if (!failedTests.contains(failedStr)) {
failedTests.add(failedStr);
}
break;
default:
// ignore