From 769a6f0193313df94c4a82b67bc51e77e26485e5 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Wed, 20 May 2020 23:16:43 -0700 Subject: [PATCH] Revert "[lit] GoogleTest framework should report failures if test binary crashes" This reverts commit ef2103182244c96f5206b02164b62b9c9e0cbce8 because it breaks the Windows bot: http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/16447 Failing Tests (2): ... lldb-unit :: API/./APITests.exe/failed_to_discover_tests_from_gtest --- utils/lit/lit/formats/googletest.py | 8 -------- .../tests/Inputs/googletest-discovery-failed/lit.cfg | 3 --- .../googletest-discovery-failed/subdir/OneTest.py | 3 --- utils/lit/tests/googletest-discovery-failed.py | 10 ---------- 4 files changed, 24 deletions(-) delete mode 100644 utils/lit/tests/Inputs/googletest-discovery-failed/lit.cfg delete mode 100644 utils/lit/tests/Inputs/googletest-discovery-failed/subdir/OneTest.py delete mode 100644 utils/lit/tests/googletest-discovery-failed.py diff --git a/utils/lit/lit/formats/googletest.py b/utils/lit/lit/formats/googletest.py index 059eb99762e..67f32cf1cdf 100644 --- a/utils/lit/lit/formats/googletest.py +++ b/utils/lit/lit/formats/googletest.py @@ -41,14 +41,6 @@ class GoogleTest(TestFormat): litConfig.warning( "unable to discover google-tests in %r: %s. Process output: %s" % (path, sys.exc_info()[1], exc.output)) - # This doesn't look like a valid gtest file. This can - # have a number of causes, none of them good. For - # instance, we could have created a broken executable. - # Alternatively, someone has cruft in their test - # directory. If we don't return a test here, then no - # failures will get reported, so return a dummy test name - # so that the failure is reported later. - yield 'failed_to_discover_tests_from_gtest' return nested_tests = [] diff --git a/utils/lit/tests/Inputs/googletest-discovery-failed/lit.cfg b/utils/lit/tests/Inputs/googletest-discovery-failed/lit.cfg deleted file mode 100644 index 66be8ec3338..00000000000 --- a/utils/lit/tests/Inputs/googletest-discovery-failed/lit.cfg +++ /dev/null @@ -1,3 +0,0 @@ -import lit.formats -config.name = 'googletest-discovery-failed' -config.test_format = lit.formats.GoogleTest('subdir', 'Test') diff --git a/utils/lit/tests/Inputs/googletest-discovery-failed/subdir/OneTest.py b/utils/lit/tests/Inputs/googletest-discovery-failed/subdir/OneTest.py deleted file mode 100644 index 4816459dee4..00000000000 --- a/utils/lit/tests/Inputs/googletest-discovery-failed/subdir/OneTest.py +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env python - -raise SystemExit("We are not a valid gtest executable!") diff --git a/utils/lit/tests/googletest-discovery-failed.py b/utils/lit/tests/googletest-discovery-failed.py deleted file mode 100644 index a8b7921f157..00000000000 --- a/utils/lit/tests/googletest-discovery-failed.py +++ /dev/null @@ -1,10 +0,0 @@ -# Check for correct error message when discovery of tests fails. -# -# RUN: not %{lit} -j 1 -v %{inputs}/googletest-discovery-failed > %t.cmd.out -# RUN: FileCheck < %t.cmd.out %s - - -# CHECK: -- Testing: -# CHECK: Failing Tests (1): -# CHECK: googletest-discovery-failed :: subdir/OneTest.py/failed_to_discover_tests_from_gtest -# CHECK: Unexpected Failures: 1