[Lldb-commits] [lldb] d89c98a - [lldb/Test] Remove issue_verification subdirectory
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri May 22 09:32:19 PDT 2020
Author: Jonas Devlieghere
Date: 2020-05-22T09:32:12-07:00
New Revision: d89c98a020c9903f31b659e3f5cc513ea878c900
URL: https://github.com/llvm/llvm-project/commit/d89c98a020c9903f31b659e3f5cc513ea878c900
DIFF: https://github.com/llvm/llvm-project/commit/d89c98a020c9903f31b659e3f5cc513ea878c900.diff
LOG: [lldb/Test] Remove issue_verification subdirectory
These files haven't been touched since 2015. According to Pavel these
were intended to be test for the test framework which never really took
of and are mostly irrelevant by now.
Differential revision: https://reviews.llvm.org/D80408
Added:
Modified:
Removed:
lldb/test/API/issue_verification/README.txt
lldb/test/API/issue_verification/TestExpectedTimeout.py.park
lldb/test/API/issue_verification/TestFail.py.park
lldb/test/API/issue_verification/TestInvalidDecorator.py.park
lldb/test/API/issue_verification/TestRerunFail.py.park
lldb/test/API/issue_verification/TestRerunFileLevelTimeout.py.park
lldb/test/API/issue_verification/TestRerunInline.py.park
lldb/test/API/issue_verification/TestRerunTimeout.py.park
lldb/test/API/issue_verification/TestSignal.py.park
lldb/test/API/issue_verification/TestSignalOutsideTestMethod.py.park
lldb/test/API/issue_verification/TestTimeout.py.park
lldb/test/API/issue_verification/disable.py
lldb/test/API/issue_verification/enable.py
lldb/test/API/issue_verification/inline_rerun_inferior.cpp
lldb/test/API/issue_verification/rerun_base.py
################################################################################
diff --git a/lldb/test/API/issue_verification/README.txt b/lldb/test/API/issue_verification/README.txt
deleted file mode 100644
index 0f1ae7f0ecfc..000000000000
--- a/lldb/test/API/issue_verification/README.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-Tests in this directory are intentionally setup to
-fail, error, timeout, etc. to verify that the buildbots
-pick up errors. The tests in this directory will be
-parked/removed/renamed after verifying they trigger
-as expected.
diff --git a/lldb/test/API/issue_verification/TestExpectedTimeout.py.park b/lldb/test/API/issue_verification/TestExpectedTimeout.py.park
deleted file mode 100644
index 67db8149f850..000000000000
--- a/lldb/test/API/issue_verification/TestExpectedTimeout.py.park
+++ /dev/null
@@ -1,20 +0,0 @@
-"""Tests that a timeout is detected by the testbot."""
-from __future__ import print_function
-
-import time
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-class ExpectedTimeoutTestCase(lldbtest.TestBase):
- """Forces test timeout."""
- mydir = lldbtest.TestBase.compute_mydir(__file__)
-
- @lldbtest.expectedFailureAll()
- def test_buildbot_sees_expected_timeout(self):
- """Tests that expected timeout logic kicks in and is picked up."""
- while True:
- try:
- time.sleep(1)
- except:
- print("ignoring exception during sleep")
diff --git a/lldb/test/API/issue_verification/TestFail.py.park b/lldb/test/API/issue_verification/TestFail.py.park
deleted file mode 100644
index fcdba39d7fe7..000000000000
--- a/lldb/test/API/issue_verification/TestFail.py.park
+++ /dev/null
@@ -1,15 +0,0 @@
-"""Tests that a FAIL is detected by the testbot."""
-
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-class FailTestCase(lldbtest.TestBase):
- """Forces test failure."""
- mydir = lldbtest.TestBase.compute_mydir(__file__)
-
- def test_buildbot_catches_failure(self):
- """Issues a failing test assertion."""
- self.assertTrue(
- False,
- "This will always fail, buildbot should flag this.")
diff --git a/lldb/test/API/issue_verification/TestInvalidDecorator.py.park b/lldb/test/API/issue_verification/TestInvalidDecorator.py.park
deleted file mode 100644
index d5c8c58506fd..000000000000
--- a/lldb/test/API/issue_verification/TestInvalidDecorator.py.park
+++ /dev/null
@@ -1,12 +0,0 @@
-from lldbsuite.test import lldbtest
-from lldbsuite.test import decorators
-
-
-class NonExistentDecoratorTestCase(lldbtest.TestBase):
-
- mydir = lldbtest.TestBase.compute_mydir(__file__)
-
- @decorators.nonExistentDecorator(bugnumber="yt/1300")
- def test(self):
- """Verify non-existent decorators are picked up by test runner."""
- pass
diff --git a/lldb/test/API/issue_verification/TestRerunFail.py.park b/lldb/test/API/issue_verification/TestRerunFail.py.park
deleted file mode 100644
index 8d1fc95502ad..000000000000
--- a/lldb/test/API/issue_verification/TestRerunFail.py.park
+++ /dev/null
@@ -1,22 +0,0 @@
-"""Tests that a flakey fail is rerun, and will pass on the rerun.
-Run this test with --rerun-all-issues specified to test that
-the tests fail on the first run, then pass on the second.
-Do not mark them as flakey as, at this time, flakey tests will
-run twice, thus causing the second run to succeed."""
-
-
-import rerun_base
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-class RerunFailTestCase(rerun_base.RerunBaseTestCase):
- """Forces test failure on first run, success on rerun."""
- @lldbtest.no_debug_info_test
- def test_buildbot_catches_failure(self):
- """Issues a failing test assertion."""
- if self.should_generate_issue():
- self.assertTrue(
- False,
- "This will fail on the first call, succeed on rerun, and "
- "alternate thereafter.")
diff --git a/lldb/test/API/issue_verification/TestRerunFileLevelTimeout.py.park b/lldb/test/API/issue_verification/TestRerunFileLevelTimeout.py.park
deleted file mode 100644
index 9422624207ce..000000000000
--- a/lldb/test/API/issue_verification/TestRerunFileLevelTimeout.py.park
+++ /dev/null
@@ -1,33 +0,0 @@
-"""Tests that a timeout is detected by the testbot."""
-from __future__ import print_function
-
-import atexit
-import time
-
-from lldbsuite.test import decorators
-import rerun_base
-
-
-class RerunTimeoutTestCase(rerun_base.RerunBaseTestCase):
- def maybe_do_timeout(self):
- # Do the timeout here if we're going to time out.
- if self.should_generate_issue():
- # We time out this time.
- while True:
- try:
- time.sleep(1)
- except:
- print("ignoring exception during sleep")
-
- # call parent
- super(RerunTimeoutTestCase, self).tearDown()
-
- @decorators.no_debug_info_test
- def test_timeout_file_level_timeout_rerun_succeeds(self):
- """Tests that file-level timeout is cleared on rerun."""
-
- # This test just needs to pass. It is the exit hook (outside
- # the test method) that will time out.
-
- # Add the exit handler that will time out the first time around.
- atexit.register(RerunTimeoutTestCase.maybe_do_timeout, self)
diff --git a/lldb/test/API/issue_verification/TestRerunInline.py.park b/lldb/test/API/issue_verification/TestRerunInline.py.park
deleted file mode 100644
index 4c50495a2ec4..000000000000
--- a/lldb/test/API/issue_verification/TestRerunInline.py.park
+++ /dev/null
@@ -1,13 +0,0 @@
-"""Tests that the rerun mechanism respects lldbinline-created tests.
-
-The current implementation of this test is expected to fail both on
-the initial run and on the rerun, assuming --rerun-all-issues is provided
-to the dotest.py run.
-
-This test could be improved by doing something in the test inferior
-C++ program that could look for the "should an issue be raised" marker
-file, and then really pass on the rerun.
-"""
-import lldbsuite.test.lldbinline as lldbinline
-
-lldbinline.MakeInlineTest(__file__, globals())
diff --git a/lldb/test/API/issue_verification/TestRerunTimeout.py.park b/lldb/test/API/issue_verification/TestRerunTimeout.py.park
deleted file mode 100644
index a8f5542ae2f5..000000000000
--- a/lldb/test/API/issue_verification/TestRerunTimeout.py.park
+++ /dev/null
@@ -1,24 +0,0 @@
-"""Tests that a timeout is detected by the testbot."""
-from __future__ import print_function
-
-import time
-
-import lldbsuite.test.decorators as decorators
-import rerun_base
-
-
-class RerunTimeoutTestCase(rerun_base.RerunBaseTestCase):
- @decorators.no_debug_info_test
- def test_timeout_rerun_succeeds(self):
- """Tests that the timeout logic kicks in and that this timeout is picked up."""
- if not self.should_generate_issue():
- # We pass this time.
- return
-
- # We time out this time.
- while True:
- # noinspection PyBroadException
- try:
- time.sleep(1)
- except:
- print("ignoring exception during sleep")
diff --git a/lldb/test/API/issue_verification/TestSignal.py.park b/lldb/test/API/issue_verification/TestSignal.py.park
deleted file mode 100644
index 5a34c096201e..000000000000
--- a/lldb/test/API/issue_verification/TestSignal.py.park
+++ /dev/null
@@ -1,25 +0,0 @@
-"""Tests that an exceptional exit is detected by the testbot."""
-
-
-import os
-import signal
-import time
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-class ExceptionalExitTestCase(lldbtest.TestBase):
- """Forces exceptional exit."""
- mydir = lldbtest.TestBase.compute_mydir(__file__)
-
- @lldbtest.skipIfWindows
- def test_buildbot_catches_exceptional_exit(self):
- """Force process to die with exceptional exit."""
-
- # Sleep for a couple seconds
- try:
- time.sleep(5)
- except:
- pass
-
- os.kill(os.getpid(), signal.SIGKILL)
diff --git a/lldb/test/API/issue_verification/TestSignalOutsideTestMethod.py.park b/lldb/test/API/issue_verification/TestSignalOutsideTestMethod.py.park
deleted file mode 100644
index 425c5fe9077b..000000000000
--- a/lldb/test/API/issue_verification/TestSignalOutsideTestMethod.py.park
+++ /dev/null
@@ -1,23 +0,0 @@
-"""Tests that an exceptional exit is detected by the testbot."""
-
-
-import atexit
-import os
-import signal
-import time
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-class ExceptionalExitOutOfTestMethodTestCase(lldbtest.TestBase):
- """Forces exceptional exit."""
- mydir = lldbtest.TestBase.compute_mydir(__file__)
-
- @lldbtest.skipIfWindows
- def test_buildbot_catches_exceptional_exit(self):
- pass
-
-def cleanup():
- os.kill(os.getpid(), signal.SIGKILL)
-
-atexit.register(cleanup)
diff --git a/lldb/test/API/issue_verification/TestTimeout.py.park b/lldb/test/API/issue_verification/TestTimeout.py.park
deleted file mode 100644
index ba7be454f9a9..000000000000
--- a/lldb/test/API/issue_verification/TestTimeout.py.park
+++ /dev/null
@@ -1,19 +0,0 @@
-"""Tests that a timeout is detected by the testbot."""
-from __future__ import print_function
-
-import time
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-class TimeoutTestCase(lldbtest.TestBase):
- """Forces test timeout."""
- mydir = lldbtest.TestBase.compute_mydir(__file__)
-
- def test_buildbot_catches_timeout(self):
- """Tests that timeout logic kicks in and is picked up."""
- while True:
- try:
- time.sleep(1)
- except:
- print("ignoring exception during sleep")
diff --git a/lldb/test/API/issue_verification/disable.py b/lldb/test/API/issue_verification/disable.py
deleted file mode 100755
index 6d1f93e8b15d..000000000000
--- a/lldb/test/API/issue_verification/disable.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-"""Renames *.py files to *.py.park."""
-import os
-import sys
-
-
-def main():
- """Drives the main script behavior."""
- script_dir = os.path.dirname(os.path.realpath(__file__))
- for filename in os.listdir(script_dir):
- basename, extension = os.path.splitext(filename)
- if basename.startswith("Test") and extension == '.py':
- source_path = os.path.join(script_dir, filename)
- dest_path = source_path + ".park"
- sys.stdout.write("renaming {} to {}\n".format(
- source_path, dest_path))
- os.rename(source_path, dest_path)
-
-if __name__ == "__main__":
- main()
diff --git a/lldb/test/API/issue_verification/enable.py b/lldb/test/API/issue_verification/enable.py
deleted file mode 100755
index eb19276de1f7..000000000000
--- a/lldb/test/API/issue_verification/enable.py
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/usr/bin/env python
-"""Renames *.py.park files to *.py."""
-import os
-import sys
-
-
-def main():
- """Drives the main script behavior."""
- script_dir = os.path.dirname(os.path.realpath(__file__))
- for filename in os.listdir(script_dir):
- basename, extension = os.path.splitext(filename)
- if basename.startswith("Test") and extension == '.park':
- source_path = os.path.join(script_dir, filename)
- dest_path = os.path.join(script_dir, basename)
- sys.stdout.write("renaming {} to {}\n".format(
- source_path, dest_path))
- os.rename(source_path, dest_path)
-
-if __name__ == "__main__":
- main()
diff --git a/lldb/test/API/issue_verification/inline_rerun_inferior.cpp b/lldb/test/API/issue_verification/inline_rerun_inferior.cpp
deleted file mode 100644
index 50a598551545..000000000000
--- a/lldb/test/API/issue_verification/inline_rerun_inferior.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-typedef int Foo;
-
-int main() {
- Foo array[3] = {1,2,3};
- return 0; //% self.expect("frame variable array --show-types --", substrs = ['(Foo [3]) wrong_type_here = {','(Foo) [0] = 1','(Foo) [1] = 2','(Foo) [2] = 3'])
-}
diff --git a/lldb/test/API/issue_verification/rerun_base.py b/lldb/test/API/issue_verification/rerun_base.py
deleted file mode 100644
index 909b93b134c7..000000000000
--- a/lldb/test/API/issue_verification/rerun_base.py
+++ /dev/null
@@ -1,27 +0,0 @@
-
-import os
-
-import lldbsuite.test.lldbtest as lldbtest
-
-
-# pylint: disable=too-few-public-methods
-class RerunBaseTestCase(lldbtest.TestBase):
- """Forces test failure."""
- mydir = lldbtest.TestBase.compute_mydir(__file__)
-
- def should_generate_issue(self):
- """Returns whether a test issue should be generated.
-
- @returns True on the first and every other call via a given
- test method.
- """
- should_pass_filename = "{}.{}.succeed-marker".format(
- __file__, self.id())
- fail = not os.path.exists(should_pass_filename)
- if fail:
- # Create the marker so that next call to this passes.
- open(should_pass_filename, 'w').close()
- else:
- # Delete the marker so next time we fail.
- os.remove(should_pass_filename)
- return fail
More information about the lldb-commits
mailing list