[Lldb-commits] [lldb] 4c935c6 - [lldb/Test] Make TestConvenienceVariables more strict
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 7 13:06:33 PST 2020
Author: Jonas Devlieghere
Date: 2020-01-07T13:06:13-08:00
New Revision: 4c935c66c43c6026d6ba565b1c6098e0f02d6962
URL: https://github.com/llvm/llvm-project/commit/4c935c66c43c6026d6ba565b1c6098e0f02d6962
DIFF: https://github.com/llvm/llvm-project/commit/4c935c66c43c6026d6ba565b1c6098e0f02d6962.diff
LOG: [lldb/Test] Make TestConvenienceVariables more strict
This test was passing even when the output of lldb.target was empty.
I've made the test more strict by checking explicitly for the target
name and by using CHECK-NEXT lines.
Added:
Modified:
lldb/test/Shell/Driver/TestConvenienceVariables.test
Removed:
################################################################################
diff --git a/lldb/test/Shell/Driver/TestConvenienceVariables.test b/lldb/test/Shell/Driver/TestConvenienceVariables.test
index a7b6faa34cb3..d9c8f7581bea 100644
--- a/lldb/test/Shell/Driver/TestConvenienceVariables.test
+++ b/lldb/test/Shell/Driver/TestConvenienceVariables.test
@@ -1,23 +1,20 @@
REQUIRES: python
-RUN: %build %p/Inputs/hello.cpp -o %t
-RUN: %lldb %t -s %p/Inputs/convenience.in -o quit | FileCheck %s
-
-script print(lldb.debugger)
+RUN: mkdir -p %t
+RUN: %build %p/Inputs/hello.cpp -o %t/target.out
+RUN: %lldb %t/target.out -s %p/Inputs/convenience.in -o quit | FileCheck %s
CHECK: stop reason = breakpoint 1.1
-CHECK: Debugger (instance: {{.*}}, id: {{[0-9]+}})
+CHECK: script print(lldb.debugger)
+CHECK-NEXT: Debugger (instance: {{.*}}, id: {{[0-9]+}})
CHECK: script print(lldb.target)
-CHECK: TestConvenienceVariables.test
+CHECK-NEXT: target.out
CHECK: script print(lldb.process)
-CHECK: SBProcess: pid = {{[0-9]+}},
-CHECK-SAME: state = stopped,
-CHECK-SAME: threads = {{[0-9]+}},
-CHECK-SAME: executable = TestConvenienceVariables.test
+CHECK-NEXT: SBProcess: pid = {{[0-9]+}}, state = stopped, threads = {{[0-9]+}}, executable = target.out
CHECK: script print(lldb.thread.GetStopDescription(100))
-CHECK: breakpoint 1.1
+CHECK-NEXT: breakpoint 1.1
CHECK: script lldb.frame.GetLineEntry().GetLine()
-CHECK: 8
+CHECK-NEXT: 8
CHECK: script lldb.frame.GetLineEntry().GetFileSpec().GetFilename()
-CHECK: hello.c
+CHECK-NEXT: hello.c
CHECK: script lldb.frame.GetFunctionName()
-CHECK: main
+CHECK-NEXT: main
More information about the lldb-commits
mailing list