Skip to content

Commit 8d074d6

Browse files
committed
FEATURE-ci-v3-integration: preserve real process probes in shell fixtures
1 parent 2ed5091 commit 8d074d6

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎scripts/test-v3-installed-consumer.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ def setUp(self):
4646
self.conversion_requests = []
4747

4848
def create_process(self, argv, **options):
49+
if str(argv[0]) not in ('bash', 'bash.exe', str(self.bash)):
50+
return self.popen(argv, **options)
4951
if argv[1:3] == ['-c', 'cygpath -u "$1"']:
5052
self.conversion_requests.append(argv[-1])
5153
return self.popen([sys.executable, '-c', f'print({self.converted_configure!r})'], **options)
@@ -92,6 +94,16 @@ def test_windows_missing_path_bash_fails_before_launching_competing_shell(self):
9294
self.assertFalse((self.output / 'tls-no/commands.json').exists())
9395

9496

97+
@unittest.skipIf(os.name == 'nt', 'ps observation uses POSIX process groups; Windows exercises native jobs')
98+
class InstalledShellPSTest(InstalledShellTest):
99+
"""Replay the shell contracts through real ps observation on POSIX hosts."""
100+
def setUp(self):
101+
super().setUp()
102+
observation = patch.object(commands.sys, 'platform', 'darwin')
103+
observation.start()
104+
self.addCleanup(observation.stop)
105+
106+
95107
class MatrixTest(unittest.TestCase):
96108
def setUp(self):
97109
self.inventory = matrix.load()

0 commit comments

Comments
 (0)