Author: jdevlieghere Date: Fri Sep 6 14:43:33 2019 New Revision: 371259 URL: http://llvm.org/viewvc/llvm-project?rev=371259&view=rev Log: [test] Add a FIXME test for stop-command-source-on-error
Modifying the interpreter settings is tricky because they don't take effect until we create a new command interpreter, which should be merely an implementation detail. This leads to confusing and unexpected scenarios. This adds a test cases with FIXMEs for some of the odd scenarios I encountered. I didn't XFAIL the test because I don't think there's a way to get an unexpected PASS if any of the commands succeeds and splitting up the file in multiple tests seems excessive. Added: lldb/trunk/lit/Settings/Inputs/DontStopCommandSource.in lldb/trunk/lit/Settings/Inputs/StopCommandSource.in lldb/trunk/lit/Settings/TestStopCommandSourceOnError.test Added: lldb/trunk/lit/Settings/Inputs/DontStopCommandSource.in URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Settings/Inputs/DontStopCommandSource.in?rev=371259&view=auto ============================================================================== --- lldb/trunk/lit/Settings/Inputs/DontStopCommandSource.in (added) +++ lldb/trunk/lit/Settings/Inputs/DontStopCommandSource.in Fri Sep 6 14:43:33 2019 @@ -0,0 +1,3 @@ +settings set interpreter.stop-command-source-on-error false +bogus +print 123400000 + 56789 Added: lldb/trunk/lit/Settings/Inputs/StopCommandSource.in URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Settings/Inputs/StopCommandSource.in?rev=371259&view=auto ============================================================================== --- lldb/trunk/lit/Settings/Inputs/StopCommandSource.in (added) +++ lldb/trunk/lit/Settings/Inputs/StopCommandSource.in Fri Sep 6 14:43:33 2019 @@ -0,0 +1,3 @@ +settings set interpreter.stop-command-source-on-error true +bogus +print 123400000 + 56789 Added: lldb/trunk/lit/Settings/TestStopCommandSourceOnError.test URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Settings/TestStopCommandSourceOnError.test?rev=371259&view=auto ============================================================================== --- lldb/trunk/lit/Settings/TestStopCommandSourceOnError.test (added) +++ lldb/trunk/lit/Settings/TestStopCommandSourceOnError.test Fri Sep 6 14:43:33 2019 @@ -0,0 +1,24 @@ +# Modifying the interpreter settings is tricky because they don't take effect +# until we create a new command interpreter, which should be merely an +# implementation detail. This leads to confusing and unexpected scenarios. +# +# Below are a few scenarios that we should fix. + +# CONTINUE: 123456789 +# STOP-NOT: 111111111 +# STOP-NOT: 123456789 + +# FIXME: Should stop +# RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -s %S/Inputs/StopCommandSource.in | FileCheck %s --check-prefix CONTINUE + +# FIXME: Should continue +# RUN: %lldb -b -s %S/Inputs/DontStopCommandSource.in -o 'bogus' -o 'print 111100000 + 11111' | FileCheck %s --check-prefix STOP + +# FIXME: Should continue +# RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -o 'bogus' -o 'print 123400000 + 56789' | FileCheck %s --check-prefix STOP + +# FIXME: Should continue +# RUN: %lldb -b -s %S/Inputs/DontStopCommandSource.in | FileCheck %s --check-prefix STOP + +# FIXME: Should continue +# RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error true' -s %S/Inputs/DontStopCommandSource.in | FileCheck %s --check-prefix STOP _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits