Skip to content

Commit 432e41c

Browse files
committed
Remove printing SKIPPED tests from output
Related-To: NEO-3173 Change-Id: I0dc44f69c7c4a988065bcc62db78087e9fc50e2c Signed-off-by: Hoppe, Mateusz <[email protected]>
1 parent d15174d commit 432e41c

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

unit_tests/custom_event_listener.h

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,16 @@ class CCustomEventListener : public ::testing::TestEventListener {
6565
}
6666

6767
void OnTestPartResult(const ::testing::TestPartResult &test_part_result) override {
68-
printf("\n");
68+
if (test_part_result.failed()) {
69+
printf("\n");
70+
}
6971
_listener->OnTestPartResult(test_part_result);
7072
}
7173

7274
void OnTestEnd(const ::testing::TestInfo &test_case) override {
73-
if (test_case.result()->Passed())
74-
return;
75-
76-
std::stringstream ss;
77-
ss << test_case.test_case_name() << "." << test_case.name();
78-
79-
if (test_case.result()->Skipped()) {
80-
testNamesSkipped.push_back(std::make_pair(ss.str(), currentSeed));
81-
std::cout << "[ SKIPPED ][ " << hardwarePrefix << " ][ " << currentSeed << " ] " << test_case.test_case_name() << "." << test_case.name() << std::endl;
82-
} else {
75+
if (test_case.result()->Failed()) {
76+
std::stringstream ss;
77+
ss << test_case.test_case_name() << "." << test_case.name();
8378
testFailures.push_back(std::make_pair(ss.str(), currentSeed));
8479
std::cout << "[ FAILED ][ " << hardwarePrefix << " ][ " << currentSeed << " ] " << test_case.test_case_name() << "." << test_case.name() << std::endl;
8580
}
@@ -134,12 +129,6 @@ class CCustomEventListener : public ::testing::TestEventListener {
134129
testsDisabled,
135130
timeElapsed);
136131

137-
for (auto skipped : testNamesSkipped) {
138-
fprintf(
139-
stdout,
140-
"[ SKIPPED ][ %s ][ %u ] %s\n", hardwarePrefix.c_str(), skipped.second, skipped.first.c_str());
141-
}
142-
143132
for (auto failure : testFailures)
144133
fprintf(
145134
stdout,
@@ -154,7 +143,6 @@ class CCustomEventListener : public ::testing::TestEventListener {
154143

155144
::testing::TestEventListener *_listener;
156145
std::vector<std::pair<std::string, int>> testFailures;
157-
std::vector<std::pair<std::string, int>> testNamesSkipped;
158146

159147
int currentSeed = -1;
160148
std::string hardwarePrefix;

0 commit comments

Comments
 (0)