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

Reviewed-by: stuefe, lmesnik
This commit is contained in:
Sonia Zaldana Calles 2024-02-15 08:03:01 +00:00 committed by Thomas Stuefe
parent 810daf8206
commit 1aae980c54

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