CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
49 lines
1.8 KiB
Python
49 lines
1.8 KiB
Python
"""
|
|
Test lldb command aliases.
|
|
"""
|
|
|
|
import unittest
|
|
import os
|
|
import lldb
|
|
from lldbsuite.test.decorators import *
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test import lldbutil
|
|
|
|
|
|
class LaunchInTerminalTestCase(TestBase):
|
|
# Darwin is the only platform that I know of that supports optionally launching
|
|
# a program in a separate terminal window. It would be great if other platforms
|
|
# added support for this.
|
|
@skipUnlessDarwin
|
|
# If the test is being run under sudo, the spawned terminal won't retain that elevated
|
|
# privilege so it can't open the socket to talk back to the test case
|
|
@unittest.skipIf(
|
|
hasattr(os, "geteuid") and os.geteuid() == 0, "test cannot be run as root"
|
|
)
|
|
# Do we need to disable this test if the testsuite is being run on a remote system?
|
|
# This env var is only defined when the shell is running in a local mac
|
|
# terminal window
|
|
@unittest.skipUnless(
|
|
"TERM_PROGRAM" in os.environ, "test must be run on local system"
|
|
)
|
|
@no_debug_info_test
|
|
def test_launch_in_terminal(self):
|
|
self.build()
|
|
exe = self.getBuildArtifact("a.out")
|
|
|
|
target = self.dbg.CreateTarget(exe)
|
|
launch_info = lldb.SBLaunchInfo(["-lAF", "/tmp/"])
|
|
launch_info.SetLaunchFlags(
|
|
lldb.eLaunchFlagLaunchInTTY | lldb.eLaunchFlagCloseTTYOnExit
|
|
)
|
|
error = lldb.SBError()
|
|
process = target.Launch(launch_info, error)
|
|
print("Error was: %s." % (error.GetCString()))
|
|
self.assertTrue(
|
|
error.Success(),
|
|
"Make sure launch happened successfully in a terminal window",
|
|
)
|
|
# Running in synchronous mode our process should have run and already
|
|
# exited by the time target.Launch() returns
|
|
self.assertState(process.GetState(), lldb.eStateExited)
|