--- /dev/null
+LEVEL = ../make
+CXX_SOURCES := inline_rerun_inferior.cpp
+CXXFLAGS += -std=c++11
+include $(LEVEL)/Makefile.rules
--- /dev/null
+"""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())
--- /dev/null
+//===-- main.cpp --------------------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+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'])
+}
# Add the test case to the globals, and hide InlineTest
__globals.update({test_name : test})
-
+
+ # Store the name of the originating file.o
+ test.test_filename = __file
return test
"""
test_class_name, test_name = EventBuilder._get_test_name_info(test)
+ # Determine the filename for the test case. If there is an attribute
+ # for it, use it. Otherwise, determine from the TestCase class path.
+ if hasattr(test, "test_filename"):
+ test_filename = test.test_filename
+ else:
+ test_filename = inspect.getfile(test.__class__)
+
event = EventBuilder.bare_event(event_type)
event.update({
"test_class": test_class_name,
"test_name": test_name,
- "test_filename": inspect.getfile(test.__class__)
+ "test_filename": test_filename
})
return event