Restrict wait on exit tests to launch only (#1104)

This commit is contained in:
Karthik Nadig 2019-01-17 11:02:33 -08:00 committed by GitHub
parent 8f68b3d359
commit 72c549c6f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -1174,7 +1174,7 @@ class VSCLifecycleMsgProcessor(VSCodeMessageProcessorBase):
self.send_event('exited', exitCode=exitcode or 0)
self._waiting = True
if wait is not None:
if wait is not None and self.start_reason == 'launch':
normal, abnormal = self._wait_options()
cfg = (normal and not exitcode) or (abnormal and exitcode)
# This must be done before we send a disconnect response

View file

@ -45,7 +45,7 @@ def test_break_on_entry(pyfile, run_as, start_method):
session.wait_for_exit()
@pytest.mark.parametrize('start_method', ['launch', 'attach_socket_cmdline'])
@pytest.mark.parametrize('start_method', ['launch'])
@pytest.mark.skipif(sys.version_info < (3, 0) and platform.system() == 'Windows',
reason="On Win32 Python2.7, unable to send key strokes to test.")
def test_wait_on_normal_exit_enabled(pyfile, run_as, start_method):
@ -86,7 +86,7 @@ def test_wait_on_normal_exit_enabled(pyfile, run_as, start_method):
assert u'Press' in decoded
@pytest.mark.parametrize('start_method', ['launch', 'attach_socket_cmdline'])
@pytest.mark.parametrize('start_method', ['launch'])
@pytest.mark.skipif(sys.version_info < (3, 0) and platform.system() == 'Windows',
reason="On windows py2.7 unable to send key strokes to test.")
def test_wait_on_abnormal_exit_enabled(pyfile, run_as, start_method):
@ -132,7 +132,7 @@ def test_wait_on_abnormal_exit_enabled(pyfile, run_as, start_method):
)
@pytest.mark.parametrize('start_method', ['launch', 'attach_socket_cmdline'])
@pytest.mark.parametrize('start_method', ['launch'])
def test_exit_normally_with_wait_on_abnormal_exit_enabled(pyfile, run_as, start_method):
@pyfile