[lldb] Rewrite TestAutoInstallMainExecutable logic
authorPavel Labath <pavel@labath.sk>
Thu, 1 Apr 2021 09:58:45 +0000 (11:58 +0200)
committerPavel Labath <pavel@labath.sk>
Thu, 1 Apr 2021 12:20:20 +0000 (14:20 +0200)
commit48e3da13519dea3bd91ab7de656c7d46105c2c01
tree3978a4f8805b657bc88e6663a160babf4a2c42ee
parentfcea4181bbfbc15a27ad4d3c06a09b706b1d6c47
[lldb] Rewrite TestAutoInstallMainExecutable logic

The test uses debug info from one binary to debug a different one. This
does not work on macos, and its pure luck that it works elsewhere (the
variable that it inspects happens to have the same address in both).

The purpose of this test is to verify that lldb has not overwritten the
target executable. That can be more easily achieved by checking the exit
code of the binary, so change the test to do that.

Also remove the llgs_test decorator, as it's preventing the test from
running on macos. All the test needs is the platform functionality of
lldb-server, which is available everywhere.
lldb/test/API/commands/target/auto-install-main-executable/Makefile
lldb/test/API/commands/target/auto-install-main-executable/TestAutoInstallMainExecutable.py
lldb/test/API/commands/target/auto-install-main-executable/main.cpp